<template>
  <div class="all">
    <div class="top" v-show="jianChaShow === false && jianYanShow === false && imgUploadShow === false">
      <header>
        <div class="div" @click="back()">
          <img src="../../../assets/返回.png" alt="">
          <span class="solt">返回</span>
        </div>
        <div class="div">
          <span v-show="isHave === false && isXiugai === false">门诊就诊记录新增</span>
          <span v-show="isXiugai === true">门诊就诊记录修改</span>
          <span v-show="isHave === true">门诊就诊记录查看</span>
        </div>
        <div class="div" >
          <span style="background: none;border: none" class="solt" v-if="menuIndex < 4" @click="next()">下一步</span>
          <span style="background: none;border: none" class="solt" v-else-if="menuIndex === 4 && isHave === false"  @click="keep()" >保存</span>
        </div>
      </header>
      <div class="menu">
<!--        <ul class="steps">-->
<!--          <li  v-for="(item, index) in menuList"-->
<!--               :key="index" @click="changeMenu(index)"-->
<!--               :class="[menuIndex === index ? 'active' : '']"-->
<!--          >{{item}}</li>-->
<!--        </ul>-->
        <el-steps :active="menuIndex" align-center>
          <el-step title="" v-for="(item, index) in menuList" :key="index"
                   @click.native="changeMenu(index)"
                   process-status="success"
                   :description="item">
            <template #icon>
              <div v-if="menuIndex >= index" style="width: 15px;height: 15px;">
                <img src="../../../assets/步骤选择.png" style="width: 15px;height: 15px;" alt="">
              </div>
              <div v-else style="width: 6px;height: 15px;background: #1DA4F2;display: flex;align-items: center;justify-content: center">
                <a style="width: 6px;height: 6px;border-radius: 50%;background: white;display: flex;position: absolute;"></a>
              </div>
            </template>
          </el-step>
        </el-steps>
      <!--  <van-steps :active="menuIndex"
                   active-color="#1da4f2">
          <van-step
            v-for="(item, index) in menuList" :key="index"
            @click.native="changeMenu(index)"
          >
            <template #active-icon>
              <a class="active_icon" >{{index + 1}}</a>
            </template>
            <template #inactive-icon>
              <a class="inactive_icon" disabled="disabled">{{index + 1}}</a>
            </template>
            {{item}}
          </van-step>
        </van-steps>-->
      </div>
      <div class="title" v-show="menuIndex == 0" @click="$toast('正在开发中，敬请期待...')" style="margin: 8px auto;display: flex;justify-content: flex-end">
        <button class="duquBtn">
         <img src="../../../assets/读取医院数据@2x.png" alt="">
          读取医院数据
        </button>
      </div>
    </div>
    <div class="top" v-show="imgUploadShow === true">
      <header>
        <div class="div" @click="imgUploadBack()">
          <img src="../../../assets/返回.png" alt="">
          <span class="solt">返回</span>
        </div>
        <div class="div">
          <span >图片上传</span>
        </div>
        <div class="div" >
          <span style="background: none;border: none" class="solt" v-show="isHave === false" @click="imgUploadKeep()" >保存</span>
        </div>
      </header>
    </div>
    <div class="top" v-show="jianChaShow === true && imgUploadShow === false || jianYanShow === true && imgUploadShow === false">
      <header>
        <div class="div" >
          <img src="../../../assets/返回.png" @click="jianChaBack()" v-show="jianChaShow === true" alt="">
          <span class="solt" @click="jianChaBack()" v-show="jianChaShow === true" >返回</span>
          <img @click="jianYanBack()" v-show="jianYanShow === true" src="../../../assets/返回.png" alt="">
          <span @click="jianYanBack()" v-show="jianYanShow === true" class="solt">返回</span>
        </div>
        <div class="div">
          <span v-show="jianChaShow === true">检查数据</span>
          <span v-show="jianYanShow === true">检验数据</span>
        </div>
        <div class="div" >
          <span v-show="jianChaShow === true && isHave === false" style="background: none;border: none" class="solt" @click="jianChakeep()" >保存</span>
          <span v-show="jianYanShow === true && isHave === false" style="background: none;border: none" class="solt" @click="jianYankeep()" >保存</span>
        </div>
      </header>
    </div>
    <div v-show="jianChaShow === false && jianYanShow === false  && imgUploadShow === false">
      <div class="content content1" v-show="menuIndex === 0">
        <ul>
          <li>
            <span>门诊号码</span>
            <input type="text" :readonly="isHave" v-model="mzhm" placeholder="请输入门诊号码">
          </li>
          <li>

            <span>* 姓名</span>
            <input type="text" readonly v-model="name" placeholder="请输入姓名">
          </li>
          <li>
            <span>* 性别</span>
            <input type="text" readonly v-model="sex" placeholder="请输入性别">
          </li>
          <li>
            <div>* 年龄</div>
            <div>
              <input class="tabInput" readonly  v-model="age" type="text" placeholder="请输入年龄" >
              <span class="ageUnit">岁</span>
            </div>
          </li>
          <li @click="[isHave === false ? isDateShow = true : isDateShow = false]">
            <div>
              <span>* 就诊日期</span>
            </div>
            <div>
              <input type="text" readonly v-model="riqi"  placeholder="请选择就诊日期">
              <img class="tan" v-show="isHave === false && isDateShow === false" src="../../../assets/下弹灰@2x.png" alt="">
              <img class="tan" v-show="isHave === false && isDateShow === true" src="../../../assets/下弹灰@2x.png" alt="">
            </div>
          </li>
          <li @click="[isHave === false ? jigoushow = true : jigoushow = false]">
            <div>
              <span>* 就诊机构</span>
            </div>
            <div>
              <input type="text" readonly v-model="jigou"  placeholder="请选择就诊机构">
              <img class="tan" v-show="isHave === false && jigoushow === false" src="../../../assets/下弹灰@2x.png" alt="">
              <img class="tan" v-show="isHave === false && jigoushow === true" src="../../../assets/上弹灰@2x.png" alt="">
            </div>
          </li>
          <li @click="[isHave === false ? keShishow = true : keShishow = false]">
            <div>
              <span>* 就诊科室</span>
            </div>
            <div>
              <input type="text" readonly v-model="keshi" placeholder="请选择就诊科室">
              <img class="tan" v-show="isHave === false && keShishow === false" src="../../../assets/下弹灰@2x.png" alt="">
              <img class="tan" v-show="isHave === false && keShishow === true" src="../../../assets/上弹灰@2x.png" alt="">
            </div>
          </li>
          <li>
            <div>
              <span>* 就诊医生</span>
            </div>
            <div>
              <input type="text" :readonly="isHave" v-model="yisheng" placeholder="请输入就诊医生">
            </div>
          </li>
          <li @click="[isHave === false ? zhenduanshow = true : zhenduanshow = false]">
            <div>
              <span>* 门诊诊断</span>
            </div>
            <div>
              <input type="text" readonly v-model="zhenduan" placeholder="请选择门诊诊断">
              <img class="tan" v-show="isHave === false && zhenduanshow === false" src="../../../assets/下弹灰@2x.png" alt="">
              <img class="tan" v-show="isHave === false && zhenduanshow === true" src="../../../assets/上弹灰@2x.png" alt="">
            </div>
          </li>
        </ul>
        <p style="color: red;font-size: 13px;margin: 10px 20px"> * 内容为必填项，本条记录只支持24小时内修改</p>
      </div>
      <div class="content content2" v-show="menuIndex === 1">
        <ul>
          <li>
            <span>主诉</span>
            <span class="xianzhi">限100字以内</span>
          </li>
          <li>
            <textarea maxlength="100" :readonly="isHave"  placeholder="请输入主诉" v-model="zhusu"></textarea>
          </li>
        </ul>
        <ul>
          <li>
            <span>现病史</span>
            <span class="xianzhi">限100字以内</span>
          </li>
          <li>
            <textarea maxlength="100" :readonly="isHave"  placeholder="请输入现病史" v-model="xianbingshi"></textarea>
          </li>
        </ul>
        <ul>
          <li>
            <span>既往史</span>
            <span class="xianzhi">限100字以内</span>
          </li>
          <li>
            <textarea maxlength="100" :readonly="isHave"  placeholder="请输入既往史" v-model="jiwangshi"></textarea>
          </li>
        </ul>
        <ul>
          <li>
            <span>体格检查</span>
            <span class="xianzhi">限100字以内</span>
          </li>
          <li>
            <textarea maxlength="100" :readonly="isHave"  placeholder="请输入体格检查" v-model="tige"></textarea>
          </li>
        </ul>
        <ul>
          <li>
            <span>辅助检查</span>
            <span class="xianzhi">限100字以内</span>
          </li>
          <li>
            <textarea maxlength="100" :readonly="isHave"  placeholder="请输入辅助检查" v-model="fuzhu"></textarea>
          </li>
        </ul>
        <div>
          <p>
            <span class="hengGang"></span>
            诊疗措施</p>
          <textarea v-model="cuoshi" :readonly="isHave"  placeholder="请输入诊疗措施"></textarea>
        </div>
      </div>
      <div class="content content3" v-show="menuIndex === 2">
        <p class="p_header" v-show="isHave===false || (isHave===true && tableList.length > 0)"><a class="hengGang"></a><span>药品信息</span></p>
        <ul v-show="isHave===false">
          <li @click="yaopinShow = true">
            <div>
              <span>药品名称</span>
            </div>
            <div>
              <input type="text" readonly v-model="mingcheng" placeholder="药品名称">
              <img class="tan" v-show="yaopinShow === false" src="../../../assets/下弹灰@2x.png" alt="">
              <img class="tan" v-show="yaopinShow === true" src="../../../assets/上弹灰@2x.png" alt="">
            </div>
          </li>
          <li class="smallLi">
            <div class="smallLi_left">
              <div style="width: 20%;">
                <span >规格</span>
              </div>
              <div>
                <input type="text" readonly v-model="guige" placeholder="规格">
              </div>
            </div>
            <div class="smallLi_right">
              <div>
                <span>单位</span>
              </div>
              <div>
                <input type="text" readonly v-model="danwei" placeholder="单位">
              </div>
            </div>
          </li>
          <li class="smallLi">
            <div class="smallLi_left" @click="[isHave === false ? pincishow = true : pincishow = false]">
              <div>
                <span>频次</span>
              </div>
              <div>
                <input type="text"
                       style="width: 75%;!important;"
                       readonly
                       v-model="pinci"
                       placeholder="频次">
                <img class="tan" v-show="pincishow === false" src="../../../assets/下弹灰@2x.png" alt="">
                <img class="tan" v-show="pincishow === true" src="../../../assets/上弹灰@2x.png" alt="">
              </div>
            </div>
            <div class="smallLi_right" @click="[isHave === false ? yongfashow = true : yongfashow = false]">
              <div>
                <span>用法</span>
              </div>
              <div style="display: flex;align-items: center">
                <input type="text"
                       readonly
                       v-model="yongfa"
                       placeholder="用法">
                <img class="tan" v-show="yongfashow === false" src="../../../assets/下弹灰@2x.png" style="margin-left: 5px!important;" alt="">
                <img class="tan" v-show="yongfashow === true" src="../../../assets/上弹灰@2x.png" style="margin-left: 5px!important;" alt="">
              </div>
            </div>
          </li>
          <li class="smallLi">
            <div class="smallLi_left" >
              <div>
                <span>一次用量</span>
              </div>
              <div>
                <input type="text" v-model="liang" placeholder="一次用量">
              </div>
            </div>
            <div class="smallLi_right">
              <div>
                <span>总量</span>
              </div>
              <div>
                <input type="text" v-model="zong" placeholder="总量">
              </div>
            </div>
          </li>
        </ul >
        <div v-show="isHave===false || (isHave===true && tableList.length > 0)" style="width: 100%;background: #fff">
          <p class="p_header" style="justify-content: space-between">
            <span style="display: flex;align-items: center">
              <a class="hengGang"></a>处方信息
            </span>
          </p>
          <div class="yaoPinList">
            <ul v-for="(item, index) in tableList" :key="index">
              <span class="badge">{{index + 1}}</span>
              <li class="li_haeder"
                  style="justify-content: space-between;align-items: center !important;">
                <div >
                  <p style="margin-bottom: 5px">
                    <span style="font-size: 15px">{{item.name}}</span>
                  </p>
                  <p style="font-size: 13px;color: #999">规格：{{item.specifications}}</p>
                </div>
                <div>
                  <a @click="deleteAdd(index)"
                     v-show="isHave === false"
                     style="width:50px;
                    height: 22px;
                    display:flex;
                    align-items:center;
                    justify-content: center;
                    color: #1da4f2;
                    font-size: 13px;
                    border-radius: 3px;
                    background: rgba(29, 164, 242, 0.1)"
                  >删除</a>
                  <!--              <img v-show="isHave===false"  style="width: 18px;height: 18px;"-->
                  <!--                   src="../../assets/垃圾桶@2x.png" alt="">-->
                </div>
              </li>
              <li class="li_yaofang">
                <div>
                  <img src="../../../assets/单位@2x.png" alt="">
                  <span>单位：{{item.danwei}}</span>
                </div>
                <div>
                  <img src="../../../assets/频次@2x.png" alt="">
                  <span>频次：{{item.pinci}}</span>
                </div>
              </li>
              <li class="li_yaofang">
                <div>
                  <img src="../../../assets/用法@2x.png" alt="">
                  <span>用法：{{item.yongfa}}</span>
                </div>
                <div>
                  <img src="../../../assets/一次用量@2x.png" alt="">
                  <span>一次用量：{{item.yongliang}}</span>
                </div>
              </li>
              <li class="li_yaofang">
                <div>
                  <img src="../../../assets/总量@2x.png" alt="">
                  <span>总量：{{item.zongliang}}</span>
                </div>
                <div>
                </div>
              </li>
            </ul>
          </div>
        </div>
        <van-empty
          style="height: 70vh;"
          v-if="tableList.length <= 0 && isHave===true"
          class="custom-image"
          description="暂无处方信息"
          :image="require('../../../assets/暂无数据.png')"
        >
        </van-empty>
      </div>
      <div class="bottom bottom1" v-show="menuIndex === 2 && isHave===false">
        <div class="chufangBtn"  @click="add()" style="
background: linear-gradient(90deg, #1DA3F2, #1DC7F2);
border-radius: 22px;margin-right: 10px;
"
             :style="{'opacity' : (isHave === true ? '0.3' : '1')}"
        >
          <img style="width: 13px;height: 13px;margin-right: 5px;" src="../../../assets/白添加.png" alt="">
          增加药品
        </div>
        <div class="chufangBtn" @click="clickUploadImg('chufang')"
             style="
             background: linear-gradient(90deg, #33CCE2, #5BD8E9);
             border-radius: 22px;">
          <img src="../../../assets/照片@2x.png" style="width: 15px;height: 15px;margin-right: 5px" alt="">
<!--          <span>上传处方照片</span>-->
          <span v-if="cimg <= 0 && isHave === false">上传处方照片</span>
          <span v-else>查看处方照片</span>
        </div>
      </div>
      <div class="content content4"  v-show="menuIndex === 3">
        <div class="table_all" v-show="isHave===false || (isHave===true && CtableList.length > 0)">
          <div class="table_top">
            <table width="100%"
                   border="0"
                   cellspacing="0"
                   cellpadding="0"
            >
              <tr>
                <th width="50">
                  <img style="width: 13px;height: 13px;margin: 0 auto"
                       src="../../../assets/sortHL.png" alt="">
                </th>
                <th width="50">序号</th>
                <th width="170">检查项目</th>
                <th width="100">金额(元)</th>
                <th width="150">检查结果</th>
              </tr>
            </table>
          </div>
          <div class="table_bottom">
            <table width="100%"
                   border="0"
                   cellspacing="0"
                   cellpadding="0">
              <tr v-for="(item, index) in CtableList" :key="index" @click="jianChaTr(item, index)">
                <td width="50">
                  <img v-if="item.imgShow === true" style="width: 13px;height: 13px;margin: 0 auto"
                       src="../../../assets/题目选择.png" alt="">
                  <img v-else style="width: 13px;height: 13px;margin: 0 auto"
                       src="../../../assets/题目未选择.png" alt="">
<!--                  ="item.imgShow === false"-->
                </td>
                <td width="50">{{index + 1}}</td>
                <td width="170" style="text-align: left">{{item.xiangmu}}</td>
                <td width="100" @click.stop="">
                  <input type="number"
                         @keyup="PriceKeyup"
                         :readonly="isHave"
                         autofocus="autofocus"
                         style="width: 100%;border: none;height: 100%;"
                         v-model="item.money">
                </td>
                <td width="150" @click.stop="jianChaRun(item)">
<!--                   如果  修改/保存状态 检查编码为空-->
                  <a style="
                  color: #1DA4F2;background: rgba(29, 164, 242, 0.1);
                  height: 18px;display: flex;
                  align-items: center;
                   border-radius: 9px;
                  justify-content: center;
                  " v-if="
                    (item.riqi === '' || item.riqi === null || item.riqi === undefined) && isHave === false"
                  >填写结果</a>
<!--                  如果检查编码不为空-->
                  <a style="height: 18px;display: flex;
                  align-items: center;
                  justify-content: center;
                  box-sizing:border-box;
                  background: rgba(243, 152, 0, 0.1);
                  border-radius: 9px;
                  color: #F39800;" v-else-if="(item.riqi !== '' && item.riqi !== null && item.riqi !== undefined)">查看结果</a>
<!--                 如果  查看状态 检查编码为空-->
                  <a v-else-if="(item.riqi === '' || item.riqi === null || item.riqi === undefined) && isHave === true"></a>
                </td>
              </tr>
            </table>
          </div>
        </div>
        <div v-show="isHave===false || (isHave===true && CtableList.length > 0)" style="width:100%;position: fixed;background: white" :style="{bottom: BottomHeight}">
          <div style="height: 44px;display: flex;align-items: center;justify-content: space-between" class="botttom_div">
            <span style="font-size: 13px;
                        display: flex;
                        align-items: center;
                        color: #333333;">
            <img style="width: 15px;height: 15px;margin-right: 5px" src="../../../assets/查看金额.png" alt="">
            合计金额</span>
            <span class="price">{{checkmoney}}</span>
          </div>
<!--          保存/修改状态-->
          <div style="width:100%;height: 60px;display: flex;align-items: center" v-show="isHave === false">
            <button v-show="CaddBtnShow === false" @click="Chadelshow = true" class="addBtn">
              <span>删除信息</span>
            </button>
            <button @click="CxiangmuShow = true"
                    v-show="CaddBtnShow === true"
                    class="addBtn">
              <img src="../../../assets/白添加.png" style="width: 13px;height: 13px;" alt="">
              <span>新增检查信息</span>
            </button>
          </div>
        </div>
        <van-empty
          style="height: 70vh;"
          v-if="CtableList.length <= 0 && isHave===true"
          class="custom-image"
          description="暂无检查信息"
          :image="require('../../../assets/暂无数据.png')"
        >
        </van-empty>
      </div>

      <div class="content content5"  v-show="menuIndex === 4">
        <div v-show="isHave===false || (isHave===true && YanTableList.length > 0)" class="table_all">
          <div class="table_top">
            <table width="100%"
                   border="0"
                   cellspacing="0"
                   cellpadding="0"
            >
              <tr>
                <th width="50">
                  <img style="width: 13px;height: 13px;margin: 0 auto"
                       src="../../../assets/sortHL.png" alt="">
                </th>
                <th width="50">序号</th>
                <th width="170">检验项目</th>
                <th width="100">金额(元)</th>
                <th width="150">检验结果</th>
              </tr>
            </table>
          </div>
          <div class="table_bottom">
            <table width="100%"
                   border="0"
                   cellspacing="0"
                   cellpadding="0">
              <tr v-for="(item, index) in YanTableList" :key="index" @click="yanTr(item, index)">
                <td width="50">
                  <img v-if="item.imgShow === true" style="width: 13px;height: 13px;margin: 0 auto"
                       src="../../../assets/题目选择.png" alt="">
                  <img v-else style="width: 13px;height: 13px;margin: 0 auto"
                       src="../../../assets/题目未选择.png" alt="">
<!--                  show="item.imgShow === false"-->
                </td>
                <td width="50">{{index + 1}}</td>
                <td width="170" style="text-align: left">{{item.xiangmu}}</td>
                <td width="100" @click.stop="">
                  <input type="number"
                         @keyup="JianYanPriceKeyup"
                         :readonly="isHave"
                         id="jianYan"
                         autofocus="autofocus"
                         style="width: 100%;border: none;height: 100%;"
                         v-model="item.money">
                </td>
                <td width="150" @click.stop="jianYanRun(item)">
                  <a style="color: #1DA4F2;background: rgba(29, 164, 242, 0.1);
                  height: 18px;display: flex;
                  align-items: center;
                   border-radius: 9px;
                  justify-content: center;"
                     v-if="(item.riqi === '' ||
                   item.riqi === null ||
                    item.riqi === undefined) && isHave === false">填写结果</a>
                  <a style="
                  height: 18px;display: flex;
                  align-items: center;
                  justify-content: center;
                  box-sizing:border-box;
                  background: rgba(243, 152, 0, 0.1);
                  border-radius: 9px;
                  color: #F39800;"
                     v-else-if="(item.riqi !== '' && item.riqi !== null && item.riqi !== undefined)">查看结果</a>
                  <!--                 如果  查看状态 检查编码为空-->
                  <a v-else-if="(item.riqi === '' || item.riqi === null || item.riqi === undefined) && isHave === true"></a>
                </td>
              </tr>
            </table>
          </div>
        </div>
        <div v-show="isHave===false || (isHave===true && YanTableList.length > 0)"
             style="width:100%;position: fixed;background: white" :style="{bottom: BottomHeight}">
          <div style="height: 44px;display: flex;align-items: center;justify-content: space-between" class="botttom_div">
            <span style="font-size: 13px;
            display: flex;
            align-items: center;
            color: #333333;">
              <img style="width: 15px;height: 15px;margin-right: 5px" src="../../../assets/查看金额.png" alt="">
              合计金额</span>
            <span class="price">{{inspermoney}}</span>
<!--            <a v-show="Number(inspermoney.split('￥')[1]) > 0">元</a>-->
          </div>
          <div style="width:100%;height: 60px;display: flex;align-items: center" v-show="isHave === false">
            <button v-show="YanAddBtnShow === false" @click="YanDelshow = true" class="addBtn">
              <span>删除信息</span>
            </button>
            <button @click="YanXiangmuShow = true"
                    v-show="YanAddBtnShow === true"
                    class="addBtn">
              <img src="../../../assets/白添加.png" style="width: 13px;height: 13px;" alt="">
              <span>新增检验信息</span>
            </button>
          </div>
        </div>
        <van-empty
          style="height: 70vh;"
          v-if="YanTableList.length <= 0 && isHave===true"
          class="custom-image"
          description="暂无检验信息"
          :image="require('../../../assets/暂无数据.png')"
        >
        </van-empty>
      </div>

      <div class="bottom bottom1" v-show="menuIndex === 1 && (isHave === false || (isHave === true && bimg > 0))">
<!--        menuIndex === 1 ||-->
        <div class="shangChuanBtn" style="display: flex" @click="clickUploadImg('menzhen')">
            <img src="../../../assets/照片@2x.png" alt="">
            <span v-if="bimg <= 0 && isHave === false">
              上传门诊病历照片
            </span>
            <span v-else>
              查看门诊病历照片
            </span>
        </div>
      </div>
    </div>
    <div class="uploadDiv" style="background: white;padding: 10px 5px 5px 10px;" v-show="imgUploadShow === true">
      <van-uploader
        v-if="isHave === false"
          v-model="fileList"
          :upload-icon="require('../../../assets/上传图片.png')"
          multiple="true"
          @delete="Delete"
          :before-delete="beforeDel"
          image-fit="cover"
          accept="image/*"
          preview-size="28.5vw"
          :after-read="updateFile"
      />
      <van-uploader
          v-else-if="isHave === true && Number(maxCount) > 0"
          :deletable="!isHave"
          v-model="fileList"
          :upload-icon="require('../../../assets/上传图片.png')"
          multiple="true"
          @delete="Delete"
          :max-count="maxCount"
          :before-delete="beforeDel"
          image-fit="cover"
          accept="image/*"
          preview-size="28.5vw"
          :after-read="updateFile"
      />
<!--      <input type="text" value="无图片" v-else-if="isHave === true && maxCount <= 0" style="width: 28.5vw;height: 28.5vw;background: rgba(229, 229, 229, 1);border: none">-->
      <van-uploader
          v-else-if="isHave === true && Number(maxCount) <= 0"
          :deletable="!isHave"
          :disabled="isHave"
          v-model="fileList"
          :upload-icon="require('../../../assets/上传图片.png')"
          multiple="true"
          @delete="Delete"
          :before-delete="beforeDel"
          image-fit="cover"
          accept="image/*"
          preview-size="28.5vw"
          :after-read="updateFile"
      />
    </div>
    <div class="Jian" v-show="jianChaShow === true && imgUploadShow === false">
      <ul class="jianUl">
        <li>
          <div>检查编码</div>
          <div>
            <input class="tabInput" :readonly="isHave" v-model="jianChaItem.bianma"  type="text"
                   placeholder="请输入检查编码" >
          </div>
        </li>
        <li>
          <div>* 检查项目</div>
          <div>
            <input class="tabInput" readonly   v-model="jianChaItem.xiangmu"  type="text"
                   placeholder="请选择检查项目" >
          </div>
        </li>
        <li >
<!--          @click="Czhenduanshow = true"-->
          <div>* 临床诊断</div>
          <div>
            <input class="tabInput"
                   readonly
                   v-model="jianChaItem.linchuangzhenduan"
                   type="text"
                   placeholder="请选择临床诊断" >
<!--            <img class="tan" src="../../assets/下弹灰@2x.png" alt="">-->
<!--            <img class="tan" v-show="haveJianCha === false && isPickLeibie === true" src="../../assets/上弹灰@2x.png" alt="">-->
          </div>
        </li>
        <li>
          <div>* 报告人员</div>
          <div>
            <input class="tabInput"
                   :readonly="isHave"
                   v-model="jianChaItem.baogaorenyuan"
                   type="text"
                   placeholder="请输入报告人员" >
            </div>
        </li>
        <li @click="[isHave === false ? CisbaogaoShow = true : CisbaogaoShow = false]">
          <div>* 报告日期</div>
          <div>
            <input class="tabInput"
                   v-model="jianChaItem.riqi"
                   type="text"
                   readonly
                   placeholder="请选择报告日期" >
            <img class="tan" v-show="CisbaogaoShow === false && isHave === false" src="../../../assets/下弹灰@2x.png" alt="">
            <img class="tan" v-show="CisbaogaoShow === true && isHave === false" src="../../../assets/上弹灰@2x.png" alt="">
          </div>
        </li>
      </ul>
      <p style="color: red;font-size: 13px;margin: 10px 10px"> * 内容为必填项，本条记录只支持24小时内修改</p>
      <div style="background: white;margin-bottom: 80px">
          <div class="title">
            <a class="hengGang"></a>
            <span>影像表现</span>
          </div>
          <div class="yinXiang">
            <textarea placeholder="请输入影像表现" :readonly="isHave" v-model="jianChaItem.biaoxian"></textarea>
          </div>
          <div class="title">
            <a class="hengGang"></a>
            <span>影像判断</span>
          </div>
          <div class="yinXiang" style="padding-bottom: 10px">
            <textarea placeholder="请输入影像判断" :readonly="isHave" v-model="jianChaItem.panduan"></textarea>
          </div>
      </div>
      <div class="jiancha_bottom">
        <div class="bottom_btn" @click="clickUploadImg('jiancha')">
          <img src="../../../assets/照片@2x.png" alt="">
          <span v-if="jianChaItem.Cjianchaimg <= 0 && isHave === false"  class="">上传检查报告照片</span>
          <span v-else >查看检查报告照片</span>
        </div>
      </div>
    </div>
    <div class="Jian" v-show="jianYanShow === true && imgUploadShow === false">
      <ul class="jianUl">
        <li>
          <div>检验编码</div>
          <div>
            <input class="tabInput" :readonly="isHave"  v-model="jianYanItem.bianma"  type="text"
                   placeholder="请选择检验编码" >
          </div>
        </li>
        <li>
          <div>* 检验项目</div>
          <div>
            <input class="tabInput" readonly  v-model="jianYanItem.xiangmu"  type="text"
                   placeholder="请选择检验项目" >
          </div>
        </li>
        <li >
<!--          @click="Jzhenduanshow = true"-->
          <div>* 临床诊断</div>
          <div>
            <input class="tabInput"
                   readonly
                   v-model="jianYanItem.zhenduan"
                   type="text"
                   placeholder="请选择临床诊断" >
          </div>
        </li>
        <li>
          <div>* 报告人员</div>
          <div>
            <input class="tabInput"
                   :readonly="isHave"
                   v-model="jianYanItem.renyuan"
                   type="text"
                   placeholder="请输入报告人员" >
          </div>
        </li>
        <li @click="[isHave === false ? JisbaogaoShow = true : JisbaogaoShow = false]">
          <div>* 报告日期</div>
          <div>
            <input class="tabInput"
                   v-model="jianYanItem.riqi"
                   type="text"
                   readonly
                   placeholder="请选择报告日期" >
            <img class="tan" v-show="isHave === false && JisbaogaoShow === false" src="../../../assets/下弹灰@2x.png" alt="">
            <img class="tan" v-show="isHave === false && JisbaogaoShow === true" src="../../../assets/上弹灰@2x.png" alt="">
          </div>
        </li>
      </ul>
      <p style="color: red;font-size: 13px;margin: 10px 10px"> * 内容为必填项，本条记录只支持24小时内修改</p>
      <div class="jianYanMingxi">
        <ul >
          <li class="jianYanMingxi_title" style="color: white;">
            <button class="btn_left">项目</button>
            <button >结果</button>
            <button class="btn_content">单位</button>
            <button class="btn_right">参考值</button>
          </li>
          <li v-for="(item, index) in jieguoList" :key="index">
<!--             项目-->
            <button class="btn_left white">{{item.detail_name}}</button>
            <!--            type = 1   -->
            <div type="text"
                 style="display: flex;align-items: center"
                 v-if="item.detail_reference_type === 1"
                 :style="{'color' : (
                   (item.detail_reference_max === undefined || item.detail_reference_min === undefined || item.jieguo === '' || item.jieguo === null || item.jieguo === undefined) ||
                    (Number(item.detail_reference_max) >=
                    Number(item.jieguo) &&
                    Number(item.jieguo) >=
                    Number(item.detail_reference_min))
                  ? '#333' : '#E3170D')}"
                 class="jianYanMingxi_input white">
              <input type="text"
                     style="width: 55px;border: none"
                     :readonly="isHave"
                     v-model="jieguoSendList[index].jieguo"
                     placeholder=""
                     class="jianYanMingxi_input white ">
              <img src="../../../assets/偏高.png" v-if="jieguoSendList[index].jieguo !== '' && (Number(item.jieguo) > Number(item.detail_reference_max))" style="width: 10px;height: 10px;margin-left: 10px;" alt="">
              <img src="../../../assets/偏低.png" v-if="jieguoSendList[index].jieguo !== '' && (Number(item.jieguo) < Number(item.detail_reference_min)) " style="width: 10px;height: 10px;margin-left: 10px" alt="">
            </div>
            <!--                type =2-->
            <input type="text"
                   :readonly="isHave"
                   :style="{'color' : (jieguoSendList[index].jieguo.jieguo === item.detail_reference_content ||  item.detail_reference_content === 'NULL') ? '#333' : 'red'}"
                   v-else-if="item.detail_reference_type === 2"
                   v-model="jieguoSendList[index].jieguo"
                   placeholder=""
                   class="jianYanMingxi_input white ">
            <!--                type = 3-->
            <input type="text"
                   readonly
                   placeholder=""
                   v-else-if="item.detail_reference_type === 3"
                   :style="{'color' : (jieguoSendList[index].jieguo === jieguoSendList[index].detail_reference_content.substring(0, 2) ? '#333333' : 'red')}"
                   v-model="jieguoSendList[index].jieguo"
                   @click="[isHave === false ? clickJieguo(jieguoSendList[index]) : '']"
                   class="jianYanMingxi_input white ">
            <!--               查看 结果 1 -->
          <!--  <div type="text"
                 readonly
                 style="display: flex;align-items: center;justify-content: center"
                 v-else-if="isHave === true && item.detail_reference_type === 1 "
                 :style="{'color' : (
                   (item.detail_reference_max === undefined || item.detail_reference_min === undefined || item.jieguo === '') ||
                    (Number(item.detail_reference_max) >=
                    Number(item.jieguo) &&
                    Number(item.jieguo) >=
                    Number(item.detail_reference_min))
                  ? '#333' : '#E3170D')}"
                 class="jianYanMingxi_input white">
              <input type="text"
                     style="width: 55px;border: none;"
                     v-model="item.jieguo"
                     readonly
                     placeholder=""
                     class="jianYanMingxi_input white ">
              <img src="../../assets/偏高.png" v-if="Number(item.jieguo) > Number(item.detail_reference_max)" style="width: 12px;height: 12px;margin-left: 10px;" alt="">
              <img src="../../assets/偏低.png" v-if="Number(item.jieguo) < Number(item.detail_reference_min) " style="width: 10px;height: 10px;margin-left: 10px" alt="">
            </div>-->
            <!--              查看 结果  2-->
<!--            <input type="text"-->
<!--                   readonly-->
<!--                   v-else-if="isHave === true &&  item.detail_reference_type === 2 && item.detail_reference_content !== undefined"-->
<!--                   v-model="item.jieguo"-->
<!--                   :style="{'color' : (item.jieguo === item.detail_reference_content ||  item.detail_reference_content === 'NULL') ? '#333' : 'red'}"-->
<!--                   class="jianYanMingxi_input white">-->
<!--            <input type="text"-->
<!--                   readonly-->
<!--                   v-else-if="isHave === true &&  item.detail_reference_type === 2 && item.detail_reference_content === undefined"-->
<!--                   v-model="item.jieguo"-->
<!--                   class="jianYanMingxi_input white">-->
            <!--               查看 结果 3-->
<!--            <input type="text"-->
<!--                   readonly-->
<!--                   v-else-if="isHave === true && item.detail_reference_type === 3"-->
<!--                   v-model="item.jieguo"-->
<!--                   :style="{'color' : (item.jieguo === item.detail_reference_content.substring(0, 2) ? '#333333' : 'red')}"-->
<!--                   class="jianYanMingxi_input white">-->
            <!--                 单位-->
            <button class="white btn_content danwei">{{item.dw}}</button>
            <!--           显示参考值       显示最大值最小值-->
            <button class="white btn_right"
                    style="color: #999999"
                    v-if="item.detail_reference_type === 1">
              {{item.detail_reference_min}}~{{item.detail_reference_max}}</button>
            <!--            显示参考值    -->
            <button class="white btn_right"
                    style="color: #999999"
                    v-else-if="item.detail_reference_type === 2 || item.detail_reference_type === 3">
              {{item.detail_reference_content}}
            </button>
          </li>
        </ul>
      </div>
        <div class="jiancha_bottom">
          <div class="bottom_btn" @click="clickUploadImg('jianyan')">
            <img src="../../../assets/照片@2x.png" alt="">
            <span v-if="jianYanItem.Jjianyanpictures <= 0" class="">上传检验报告照片</span>
            <span v-else class="">查看检验报告照片</span>
          </div>
        </div>
    </div>
    <van-popup round v-model="isDateShow" position="bottom">
      <van-datetime-picker
        v-model="currentDate"
        type="datetime"
        :min-date="minDate"
        :max-date="maxDate"
        :formatter="formatter"
        @confirm="Onconfirm()"
        @cancel="isDateShow = false"
        title="选择就诊日期"
      />
    </van-popup>
    <van-popup v-model="yaopinShow"
               :close-on-click-overlay="false"
               round position="bottom">
      <van-picker
        title="请选择药品名称"
        show-toolbar
        :columns="yaopinColumns"
        @cancel="yaopinShow = false, mingcheng = '', guige = '', danwei = ''"
        @confirm="yaopinonConfirm"
        confirm-button-text="下一步"
      >
        <template #columns-top>
          <div class="search">
            <form action="/">
              <van-search
                v-model="yaopinValue"
                show-action
                placeholder="请输入药品名称"
                @keyup.enter="yaopinonSearch"
                @input="yaopinonSearch"
                @search="yaopinonSearch"
                shape="round"
              >
                <template #action>
<!--                  <div @click="yaopinonSearch" class="solt">搜索</div>-->
                </template>
              </van-search>
            </form>
          </div>
        </template>
      </van-picker>
    </van-popup>
    <van-popup v-model="keShishow" round position="bottom">
      <van-picker
        title="请选择科室"
        show-toolbar
        :columns="keshiColumns"
        @cancel="keShishow = false"
        @confirm="keShionConfirm"
      >
        <template #columns-top>
          <div class="search">
            <form action="/">
              <van-search
                v-model="keshiValue"
                show-action
                placeholder="请输入科室"
                @keyup.enter="keshionSearch"
                @input="keshionSearch"
                @search="keshionSearch"
                shape="round"
              >
                <template #action>
<!--                  <div @click="keshionSearch" class="solt">搜索</div>-->
                </template>
              </van-search>
            </form>
          </div>
        </template>
      </van-picker>
    </van-popup>
    <van-popup v-model="jigoushow"
               round position="bottom">
        <van-area v-show="cityshow === true"
                  item-height="15vw"
                  :columns-num="2"
                  title="请选择城市"
                  @cancel="cityshow = false"
                  @confirm="onAreaConfirm"
                  :area-list="areaList" />
      <!--                  @change="onAreaConfirm"-->
      <van-picker
        show-toolbar
        title="请选择机构"
        :columns="jigouColumns"
        @cancel="jigoushow = false"
        @confirm="jigouonConfirm"
        v-show="cityshow === false"
      >
        <template #columns-top>
          <div class="search">
            <form action="/">
              <van-search
                v-model="jigouValue"
                placeholder="请输入机构"
                @keyup.enter="jigouonSearch"
                @input="jigouonSearch"
                @search="jigouonSearch"
                shape="round"
              >
                <template #left-icon>
                  <div style="height: 100%;border-right:1px solid #E5E5E5;display: flex;align-items: center">
                    <img src="../../../assets/地址蓝.png" style="width: 12px;height: 13px;margin-right: 5px" alt="">
                    <input type="text"
                           class="cityInput"
                           @click="cityshow = true"
                           placeholder="选择城市"
                           v-model="city"
                           readonly
                           style="width: 60px;height: 100%;border: none;background: none;color: #1DA4F2">
                  </div>
                  </template>
              </van-search>
            </form>
          </div>
        </template>
      </van-picker>
    </van-popup>
    <van-popup v-model="pincishow" round position="bottom">
      <van-picker
        title="请选择频次"
        show-toolbar
        :columns="pinciColumns"
        @cancel="pincishow = false"
        @confirm="pincionConfirm"
      >
      </van-picker>
    </van-popup>
    <van-popup v-model="yongfashow" round position="bottom">
      <van-picker
        title="请选择用法"
        show-toolbar
        :columns="yongfaColumns"
        @cancel="yongfashow = false"
        @confirm="yongfaonConfirm"
      >
      </van-picker>
    </van-popup>
    <van-popup v-model="guigeshow"
               :close-on-click-overlay="false"
               round position="bottom">
      <van-picker
        title="请选择规格"
        show-toolbar
        :columns="guigeColumns"
        :close-on-click-overlay="false"
        @cancel="guigeshow = false, yaopinShow = true"
        @confirm="guigeonConfirm"
      >
      </van-picker>
    </van-popup>
    <van-popup v-model="zhenduanshow" round position="bottom">
      <van-picker
        title="请选择门诊诊断"
        show-toolbar
        :columns="zhenduanColumns"
        @cancel="zhenduanshow = false"
        @confirm="zhenduanConfirm"
      >
        <template #columns-top>
          <div class="search">
            <form action="/">
              <van-search
                v-model="zhenduanValue"
                show-action
                placeholder="请输入诊断"
                @keyup.enter="zhenduanSearch"
                @input="zhenduanSearch"
                @search="zhenduanSearch"
                shape="round"
              >
                <template #action>
<!--                  <div @click="zhenduanSearch" class="solt">搜索</div>-->
                </template>
              </van-search>
            </form>
          </div>
        </template>
      </van-picker>
    </van-popup>
    <van-popup v-model="CxiangmuShow" round position="bottom">
      <van-picker
        title="请选择检查项目"
        show-toolbar
        :columns="CxiangmuColumns"
        @cancel="CxiangmuShow = false"
        @confirm="CxiangmuConfirm"
      >
        <template #columns-top>
          <div class="search">
            <form action="/">
              <van-search
                v-model="CxiangmuValue"
                show-action
                placeholder="请输入检查项目"
                @search="CxiangmuSearch"
                @keyup.enter="CxiangmuSearch"
                @input="CxiangmuSearch"
                shape="round"
              >
                <template #action>
                  <!--                  <div @click="xiangmuSearch" class="solt">搜索</div>-->
                </template>
              </van-search>
            </form>
          </div>
        </template>
      </van-picker>
    </van-popup>
    <van-popup v-model="YanXiangmuShow" round position="bottom">
      <van-picker
        title="请选择检验项目"
        show-toolbar
        :columns="YanXiangmuColumns"
        @cancel="YanXiangmuShow = false"
        @confirm="YanXiangmuConfirm"
      >
        <template #columns-top>
          <div class="search">
            <form action="/">
              <van-search
                v-model="YanXiangmuValue"
                show-action
                placeholder="请输入检验项目"
                @search="YanXiangmuSearch"
                @keyup.enter="YanXiangmuSearch"
                @input="YanXiangmuSearch"
                shape="round"
              >
                <template #action>
                  <!--                  <div @click="xiangmuSearch" class="solt">搜索</div>-->
                </template>
              </van-search>
            </form>
          </div>
        </template>
      </van-picker>
    </van-popup>
    <van-dialog v-model="delshow"
                width="80%"
                confirm-button-color="#1da4f2"
                title="确认删除该药品吗？"
                @confirm="delConfirm()"
                show-cancel-button>
    </van-dialog>
    <van-dialog v-model="Chadelshow"
                width="80%"
                confirm-button-color="#1da4f2"
                title="确定删除该项目吗？"
                @confirm="ChadelConfirm()"
                show-cancel-button>
    </van-dialog>
    <van-dialog v-model="YanDelshow"
                width="80%"
                confirm-button-color="#1da4f2"
                title="确定删除该项目吗？"
                @confirm="YandelConfirm()"
                show-cancel-button>
    </van-dialog>
    <van-dialog v-model="backshow"
                width="80%"
                confirm-button-color="#1da4f2"
                title="该记录未保存，是否确认退出？"
                @confirm="backConfirm()"
                show-cancel-button>
    </van-dialog>
    <van-popup round v-model="CisbaogaoShow" position="bottom">
      <van-datetime-picker
        v-model="Cbaogaoriqi"
        type="datetime"
        :min-date="minDate"
        :max-date="maxDate"
        :formatter="formatter"
        @confirm="CbaogaoriqiConfirm()"
        @cancel="CisbaogaoShow = false"
        title="选择报告日期"
      />
    </van-popup>
    <van-popup v-model="Czhenduanshow" round position="bottom">
      <van-picker
        title="请选择临床诊断"
        show-toolbar
        :columns="CzhenduanColumns"
        @cancel="Czhenduanshow = false"
        @confirm="CzhenduanConfirm"
      >
        <template #columns-top>
          <div class="search">
            <form action="/">
              <van-search
                v-model="CzhenduanValue"
                show-action
                placeholder="请输入诊断"
                @keyup.enter="CzhenduanSearch"
                @input="CzhenduanSearch"
                @search="CzhenduanSearch"
                shape="round"
              >
                <template #action>
                  <!--                  <div @click="zhenduanSearch" class="solt">搜索</div>-->
                </template>
              </van-search>
            </form>
          </div>
        </template>
      </van-picker>
    </van-popup>
    <van-popup round v-model="JisbaogaoShow" position="bottom">
      <van-datetime-picker
        v-model="Jbaogaoriqi"
        type="datetime"
        :min-date="minDate"
        :max-date="maxDate"
        :formatter="formatter"
        @confirm="JbaogaoriqiConfirm()"
        @cancel="JisbaogaoShow = false"
        title="选择报告日期"
      />
    </van-popup>
    <van-popup v-model="Jzhenduanshow" round position="bottom">
      <van-picker
        title="请选择临床诊断"
        show-toolbar
        :columns="JzhenduanColumns"
        @cancel="Jzhenduanshow = false"
        @confirm="JzhenduanConfirm"
      >
        <template #columns-top>
          <div class="search">
            <form action="/">
              <van-search
                v-model="JzhenduanValue"
                show-action
                placeholder="请输入诊断"
                @keyup.enter="JzhenduanSearch"
                @input="JzhenduanSearch"
                @search="JzhenduanSearch"
                shape="round"
              >
                <template #action>
                  <!--                  <div @click="zhenduanSearch" class="solt">搜索</div>-->
                </template>
              </van-search>
            </form>
          </div>
        </template>
      </van-picker>
    </van-popup>
    <van-popup v-model="isJieguoShow" round position="bottom">
      <van-picker
        title="请选择结果"
        show-toolbar
        :columns="jieguoColumns"
        @cancel="isJieguoShow = false"
        @confirm="jieguoConfirm"
      >
      </van-picker>
    </van-popup>
  </div>
</template>

<script>
import area from '../../../components/China/area'
import {Toast} from 'vant'
import $ from 'jquery'
import lrz from 'lrz'
export default {
  name: 'AddMenZhen',
  data () {
    return {
      areaList: area,
      cityshow: false,
      menuList: ['基本信息', '门诊病历', '处方信息', '检查信息', '检验信息'],
      delshow: false,
      data_user_id: this.$route.query.data_user_id, // 档案人id
      op_user_id: this.$route.query.op_user_id, // 登陆人id
      menuIndex: 0,
      name: '',
      age: '',
      sex: '',
      mzhm: '',
      riqi: '',
      jigou: '',
      keshi: '',
      yisheng: '',
      zhenduan: '',
      zhusu: '',
      xianbingshi: '',
      jiwangshi: '',
      tige: '',
      fuzhu: '',
      cuoshi: '',
      mingcheng: '',
      liang: '',
      guige: '',
      danwei: '',
      pinci: '',
      yongfa: '',
      zong: '',
      tableList: [],
      minDate: new Date(2000, 0, 1),
      maxDate: new Date(2025, 10, 1),
      currentDate: new Date(),
      isDateShow: false,
      isHave: false,
      // 用药名称
      guigeAll: [],
      yaopinShow: false,
      yaopinColumns: [],
      yaopinValue: '',
      id: this.$route.query.id,
      // 科室
      keShishow: false,
      keshiColumns: [],
      keshiValue: '',
      // 机构
      jigoushow: false,
      jigouColumns: [],
      jigouValue: '',
      // 用药频次
      pincishow: false,
      pinciColumns: ['一天一次', '一天两次', '一天三次'],
      //  用药用法
      yongfashow: false,
      yongfaColumns: [],
      delIndex: 0,
      // 诊断
      zhenduanshow: false,
      zhenduanColumns: [],
      zhenduanValue: '',
      //  规格
      guigeshow: false,
      guigeColumns: [],
      active: 0,
      // 检查 项目
      CxiangmuColumns: [],
      CxiangmuValue: '',
      CxiangmuList: [],
      CxiangmuShow: false,
      CaddBtnShow: true,
      CtableList: [],
      CdelIndex: 0,
      // 检查总金额
      checkmoney: '￥0',
      Chadelshow: false,
      //   检验
      YanAddBtnShow: true,
      YanDelshow: false,
      YanXiangmuShow: false,
      YanXiangmuColumns: [],
      YanXiangmuList: [],
      YanTableList: [],
      YanXiangmuValue: '',
      YanDelIndex: 0,
      // 检验总金额
      inspermoney: '￥0',
      jianChaShow: false,
      jianYanShow: false,
      jianChaItem: [],
      jianChaItem1: [],
      jianYanItem: [],
      jianYanItem1: [],
      Cbaogaoriqi: new Date(),
      CisbaogaoShow: false,
      Czhenduanshow: false,
      CzhenduanColumns: [],
      CzhenduanValue: '',
      JisbaogaoShow: false,
      Jbaogaoriqi: new Date(),
      JzhenduanColumns: [],
      JzhenduanValue: '',
      Jzhenduanshow: false,
      jieguoSendList: [],
      jieguoList: [],
      isJieguoShow: false,
      jieguoColumns: ['阴性', '阳性'],
      bimg: [],
      cimg: [],
      imgUploadShow: false,
      fileList: [],
      imgNowPush: '',
      imgList: [],
      isTijiao: false,
      city: '',
      shengIndex: 0,
      shiIndex: 0,
      backshow: false,
      isXiugai: false,
      isSend: true,
      maxCount: 0,
      isEdit: Number(this.$route.query.isEdit),
      chushengriqi: ''
    }
  },
  computed: {
    BottomHeight () {
      if (sessionStorage.getItem('isShowtabbar')) {
        return 0
      } else {
        return '50px'
      }
    }
  },
  mounted () {
    // $('.all').css('height', $(window).height() + 'px')
    $('.jianYanMingxi').css('min-height', $(window).height() - 320 - 44 + 'px')
    this.getFindUserXinXi()
    if (this.id !== undefined && this.id !== null && this.id !== '') {
      this.getfinOneMedical()
    }
    //  获取科室
    this.getfindKeShiZiDian()
    // 药品字典 去重名称
    this.findYaoPinQuChongZiDian()
    // 门诊诊断
    this.getZhenduan()
    // 用法字典
    this.getlistByType()
    // 检查项目字典
    this.getfindXiangMuZiDian()
    // 检验项目字典
    this.getJianyanZiDian()
    // 检查诊断
    this.getJianchaZhenduan()
    // 检验诊断
    this.getJianYanZhenduan()
    //  获取机构

    // 获取定位
    this.city = sessionStorage.getItem('LocationCity')
    if (this.city === '定位中') {
      this.city = ''
    }
    // 获取医院
    this.getfindHopZiDian()
  },
  methods: {
    onAreaConfirm (val) {
      this.city = val[1].name
      // //  查看机构字典表
      this.getfindHopZiDian()
      this.cityshow = false
    },
    // 上传图片
    updateFile (file) {
      this.checkfileUpload(file, 0)
    },
    // 上传图片请求操作
    checkfileUpload (file, i) {
      if (file.length === undefined) {
        this.isSend = false
        file.status = 'uploading'
        file.message = '正在压缩中...'
        if (file.file !== undefined) {
          lrz(file.file, {
            width: 2000,
            quality: 0.7 // 图片压缩质量，取值0-1，默认为0.7
          })
            .then((rst) => {
              this.$http.checkfileUpload({base64: rst.base64})
                .then(res => {
                  console.log(res)
                  if (res.data.status === 'success') {
                    var obj = {
                      picture: res.data.sign_url
                    }
                    this.imgList.push(obj)
                    this.isSend = true
                    file.status = ''
                    file.message = ''
                  }
                })
                .catch(err => {
                  console.log(err)
                })
            })
            .catch((error) => {
              console.log('失败', error)
              // 失败时执行
            })
        } else {
          lrz(file, {
            width: 2000,
            quality: 0.7 // 图片压缩质量，取值0-1，默认为0.7
          })
            .then((rst) => {
              this.$http.checkfileUpload({base64: rst.base64})
                .then(res => {
                  console.log(res)
                  if (res.data.status === 'success') {
                    var obj = {
                      picture: res.data.sign_url
                    }
                    this.imgList.push(obj)
                    this.isSend = true
                    file.status = ''
                    file.message = ''
                  }
                })
                .catch(err => {
                  console.log(err)
                })
            })
            .catch((error) => {
              console.log('失败', error)
              // 失败时执行
            })
        }
      } else {
        if (i === file.length) { //  || this.fileList.length > 8
          this.isSend = true
          return false
        }
        this.isSend = false
        if (i === 0) {
          for (var j = 0; j < file.length; j++) {
            file[j].status = 'uploading'
            file[j].message = '正在压缩中...'
          }
        }
        lrz(file[i].file, {
          width: 2000,
          quality: 0.7 // 图片压缩质量，取值0-1，默认为0.7
        })
          .then((rst) => {
            this.$http.checkfileUpload({base64: rst.base64})
              .then(res => {
                console.log(res)
                if (res.data.status === 'success') {
                  var obj = {
                    picture: res.data.sign_url
                  }
                  this.imgList.push(obj)
                  file[i].status = ''
                  file[i].message = ''
                  i++
                  this.checkfileUpload(file, i)
                }
              })
              .catch(err => {
                console.log(err)
              })
          })
          .catch((error) => {
            console.log('失败', error)
          })
      }
      console.log(this.imgList)
    },
    // 删除图片
    Delete (file, detail) {
      this.imgList.splice(detail.index, 1)
    },
    beforeDel (detail) {
      if (this.isSend === true) {
        return true
      } else {
        Toast('请压缩完之后再进行操作')
        return false
      }
    },
    // 图片上传返回按钮
    imgUploadBack () {
      this.imgUploadShow = false
      // if (this.imgNowPush === 'menzhen') {
      //   this.bimg = []
      // } else if (this.imgNowPush === 'chufang') {
      //   this.cimg = []
      // } else if (this.imgNowPush === 'jiancha') {
      //   this.jianChaItem.Cjianchaimg = []
      // } else if (this.imgNowPush === 'jianyan') {
      //   this.jianYanItem.jianyanpictures = []
      // }
    },
    // 图片上传保存按钮
    imgUploadKeep () {
      if (this.isSend === true) {
      } else {
        Toast('请压缩完之后再进行操作')
        return false
      }
      var _this = this
      var obj
      if (this.imgNowPush === 'menzhen') {
        this.bimg = this.imgList
      } else if (this.imgNowPush === 'chufang') {
        this.cimg = this.imgList
      } else if (this.imgNowPush === 'jiancha') {
        if (this.isTijiao === true) {
          this.jianChaItem.Cjianchaimg = []
          this.imgList.forEach(function (curr, index, arr) {
            obj = {
              picture: curr.picture,
              id: _this.jianChaItem.id
            }
            _this.jianChaItem.Cjianchaimg.push(obj)
          })
        } else {
          this.jianChaItem.Cjianchaimg = this.imgList
        }
      } else if (this.imgNowPush === 'jianyan') {
        if (this.isTijiao === true) {
          this.jianYanItem.Jjianyanpictures = []
          this.imgList.forEach(function (curr, index, arr) {
            obj = {
              picture: curr.picture,
              id: _this.jianYanItem.id
            }
            _this.jianYanItem.Jjianyanpictures.push(obj)
          })
        } else {
          this.jianYanItem.Jjianyanpictures = this.imgList
        }
      }
      this.imgList = []
      this.fileList = []
      this.imgUploadShow = false
    },
    // 点击上传
    clickUploadImg (value) {
      this.imgList = []
      this.fileList = []
      this.imgNowPush = value
      var obj, ott
      var _this = this
      if (this.imgNowPush === 'menzhen') {
        this.bimg.forEach(function (curr, index, arr) {
          obj = {
            url: curr.picture,
            isImage: true
          }
          ott = {
            picture: curr.picture
          }
          _this.imgList.push(ott)
          _this.fileList.push(obj)
        })
        this.maxCount = this.bimg.length
      } else if (this.imgNowPush === 'chufang') {
        this.cimg.forEach(function (curr, index, arr) {
          obj = {
            url: curr.picture,
            isImage: true
          }
          ott = {
            picture: curr.picture
          }
          _this.imgList.push(ott)
          _this.fileList.push(obj)
        })
        this.maxCount = this.cimg.length
      } else if (this.imgNowPush === 'jiancha') {
        // this.imgList = this.jianChaItem.Cjianchaimg
        this.jianChaItem.Cjianchaimg.forEach(function (curr, index, arr) {
          obj = {
            url: curr.picture,
            isImage: true
          }
          if (_this.isTijiao === true) {
            ott = {
              picture: curr.picture,
              id: _this.jianChaItem.id
            }
          } else {
            ott = {
              picture: curr.picture
            }
          }
          _this.imgList.push(ott)
          _this.fileList.push(obj)
        })
        this.maxCount = this.jianChaItem.Cjianchaimg.length
      } else if (this.imgNowPush === 'jianyan') {
        this.jianYanItem.Jjianyanpictures.forEach(function (curr, index, arr) {
          obj = {
            url: curr.picture,
            isImage: true
          }
          if (_this.isTijiao === true) {
            ott = {
              picture: curr.picture,
              id: _this.jianYanItem.id
            }
          } else {
            ott = {
              picture: curr.picture
            }
          }
          _this.imgList.push(ott)
          _this.fileList.push(obj)
        })
        this.maxCount = this.jianYanItem.Jjianyanpictures.length
      }
      this.imgUploadShow = true
    },
    // 阴性 阳性的结果确定按钮
    jieguoConfirm (value, index) {
      this.NowItem.jieguo = value
      this.isJieguoShow = false
    },
    clickJieguo (item) {
      if (this.isHave === false) {
        this.isJieguoShow = true
        this.NowItem = item /// ?????//
      } else {
        this.isJieguoShow = false
      }
    },
    // 检查诊断 确定
    CzhenduanConfirm (value, index) {
      this.jianChaItem.linchuangzhenduan = value
      this.Czhenduanshow = false
    },
    // 检查诊断 搜索
    CzhenduanSearch () {
      this.getJianchaZhenduan()
    },
    // 检查诊断
    getJianchaZhenduan () {
      this.$http.getDiagnoseList({key: this.CzhenduanValue})
        .then(res => {
          console.log(res)
          this.CzhenduanColumns = []
          if (res.data.status === 'success') {
            for (var i = 0; i < res.data.data.length; i++) {
              this.CzhenduanColumns.push(res.data.data[i].name)
            }
          }
        })
        .catch(err => {
          console.log(err)
        })
    },
    // 检验诊断
    getJianYanZhenduan () {
      this.$http.getDiagnoseList({key: this.JzhenduanValue})
        .then(res => {
          console.log(res)
          this.JzhenduanColumns = []
          if (res.data.status === 'success') {
            for (var i = 0; i < res.data.data.length; i++) {
              this.JzhenduanColumns.push(res.data.data[i].name)
            }
          }
        })
        .catch(err => {
          console.log(err)
        })
    },
    // 检查报告日期 确定
    CbaogaoriqiConfirm () {
      this.jianChaItem.riqi = this.wanzhengDate(this.Cbaogaoriqi)
      this.CisbaogaoShow = false
    },
    // 检查点击表格 跳转
    jianChaRun (item) {
      if (this.isHave === true && (item.riqi === '' || item.riqi === undefined || item.riqi === null)) {
        return false
      }
      this.jianChaShow = true
      this.jianChaItem = item
      this.jianChaItem1.riqi = item.riqi
      this.jianChaItem1.biaoxian = item.biaoxian
      this.jianChaItem1.panduan = item.panduan
      this.jianChaItem1.baogaorenyuan = item.baogaorenyuan
      this.jianChaItem1.Cjianchaimg = item.Cjianchaimg
      this.jianChaItem1.bianma = item.bianma
    },
    // 检查页面返回
    jianChaBack () {
      // this.jianChaItem.bianma = this.jianChaItem1.bianma

      this.jianChaItem.riqi = this.jianChaItem1.riqi
      this.jianChaItem.biaoxian = this.jianChaItem1.biaoxian
      this.jianChaItem.panduan = this.jianChaItem1.panduan
      this.jianChaItem.baogaorenyuan = this.jianChaItem1.baogaorenyuan
      this.jianChaItem.Cjianchaimg = this.jianChaItem1.Cjianchaimg
      this.jianChaItem.bianma = this.jianChaItem1.bianma
      this.jianChaShow = false
    },
    // 检查保存
    jianChakeep () {
      if (
        (this.jianChaItem.baogaorenyuan !== '' && this.jianChaItem.baogaorenyuan !== null && this.jianChaItem.baogaorenyuan !== undefined) ||
        (this.jianChaItem.riqi !== '' && this.jianChaItem.riqi !== null && this.jianChaItem.riqi !== undefined) ||
        this.jianChaItem.Cjianchaimg.length > 0
      ) {
        // (this.jianChaItem.bianma !== '' && this.jianChaItem.bianma !== null && this.jianChaItem.bianma !== undefined) ||
        // if (this.jianChaItem.bianma === '' || this.jianChaItem.bianma === null) {
        //   Toast('请输入检查编码')
        //   return false
        // }
        // if (this.jianChaItem.linchuangzhenduan === '') {
        //   Toast('请选择临床诊断')
        //   return false
        // }
        if (this.jianChaItem.baogaorenyuan === '' || this.jianChaItem.baogaorenyuan === null) {
          Toast('请输入报告人员')
          return false
        }
        if (this.jianChaItem.riqi === '' || this.jianChaItem.riqi === null) {
          Toast('请选择报告日期')
          return false
        }
        if (this.jianChaItem.Cjianchaimg.length <= 0) {
          Toast('请上传检查报告照片')
          return false
        }
      }
      this.jianChaShow = false
    },
    // 检验诊断
    JzhenduanConfirm (value, index) {
      this.jianYanItem.zhenduan = value
      this.Jzhenduanshow = false
    },
    // 获取检验项目的详细指标
    getfindXiangMuDetailZiDian (id) {
      this.$http.findXiangMuDetailZiDian({id: id})
        .then(res => {
          console.log(res)
          if (res.data.status === 'success') {
            if (this.jianYanItem.detail.length > 0) {
              this.jieguoList = this.jianYanItem.detail
              this.jieguoSendList = this.jianYanItem.detail
            } else {
              this.jieguoSendList = []
              this.jieguoList = res.data.data
              var _this = this
              var obj
              res.data.data.forEach(function (current, index, arr) {
                if (current.xiangmuid !== '' && current.xiangmuid !== null && current.xiangmuid !== undefined) {
                  obj = {
                    detail_name: current.detail_name,
                    detail_reference_content: current.detail_reference_content,
                    detail_reference_type: current.detail_reference_type,
                    id: current.id,
                    inspect_id: current.inspect_id,
                    xiangmuid: current.xiangmuid,
                    jieguo: ''
                  }
                } else {
                  obj = {
                    detail_name: current.detail_name,
                    detail_reference_content: current.detail_reference_content,
                    detail_reference_type: current.detail_reference_type,
                    id: current.id,
                    inspect_id: current.inspect_id,
                    xiangmuid: current.id,
                    jieguo: ''
                  }
                }
                _this.jieguoSendList.push(obj)
              })
            }
          }
        })
        .catch(err => {
          console.log(err)
        })
    },
    // 检验诊断搜索
    JzhenduanSearch () {
      this.getJianYanZhenduan()
    },
    // 检验跳转
    jianYanRun (item) {
      if (this.isHave === true && (item.riqi === '' || item.riqi === undefined || item.riqi === null)) {
        return false
      }
      this.jianYanShow = true
      if (this.isXiugai == true) {
        if (item.jianyanxiangmu_id) {
          this.getfindXiangMuDetailZiDian(item.jianyanxiangmu_id)
          console.log(111)
        } else {
          this.getfindXiangMuDetailZiDian(item.id)
        }
      } else {
        this.getfindXiangMuDetailZiDian(item.id)
      }
      // this.jieguoSendList = this.jianYanItem.detail

      this.jianYanItem = item
      this.jianYanItem1.bianma = item.bianma
      this.jianYanItem1.zhenduan = item.zhenduan
      this.jianYanItem1.renyuan = item.renyuan
      this.jianYanItem1.riqi = item.riqi
      this.jianYanItem1.xiangmu = item.xiangmu
      this.jianYanItem1.Jjianyanpictures = item.Jjianyanpictures
      this.jianYanItem1.detail = item.detail
    },
    // 检验日期的确定按钮
    JbaogaoriqiConfirm () {
      this.jianYanItem.riqi = this.wanzhengDate(this.Jbaogaoriqi)
      this.JisbaogaoShow = false
    },
    // 检验返回
    jianYanBack () {
      this.jianYanItem.bianma = this.jianYanItem1.bianma
      this.jianYanItem.zhenduan = this.jianYanItem1.zhenduan
      this.jianYanItem.renyuan = this.jianYanItem1.renyuan
      this.jianYanItem.riqi = this.jianYanItem1.riqi
      this.jianYanItem.xiangmu = this.jianYanItem1.xiangmu
      this.jianYanItem.Jjianyanpictures = this.jianYanItem1.Jjianyanpictures
      this.jianYanItem.detail = this.jianYanItem1.detail
      this.jianYanShow = false
    },
    // 检验保存
    jianYankeep () {
      if (
        (this.jianYanItem.renyuan !== '' && this.jianYanItem.renyuan !== null && this.jianYanItem.renyuan !== undefined) ||
        (this.jianYanItem.riqi !== '' && this.jianYanItem.riqi !== null && this.jianYanItem.riqi !== undefined) ||
        this.jianYanItem.Jjianyanpictures.length > 0
      ) {
        // (this.jianYanItem.bianma !== '' && this.jianYanItem.bianma !== null && this.jianYanItem.bianma !== undefined) ||
        // if (this.jianYanItem.bianma === '' || this.jianYanItem.bianma === null) {
        //   Toast('请输入检验编码')
        //   return false
        // }
        // if (this.jianYanItem.zhenduan === '') {
        //   Toast('请选择临床诊断')
        //   return false
        // }
        if (this.jianYanItem.renyuan === '' || this.jianYanItem.renyuan === null) {
          Toast('请输入报告人员')
          return false
        }
        if (this.jianYanItem.riqi === '' || this.jianYanItem.riqi === null) {
          Toast('请选择报告日期')
          return false
        }
        if (this.jianYanItem.Jjianyanpictures.length <= 0) {
          Toast('请上传检验报告照片')
          return false
        }
      }
      this.jianYanItem.detail = this.jieguoSendList
      this.jianYanShow = false
    },
    // 检验金额输入
    JianYanPriceKeyup () {
      var price = 0
      this.YanTableList.forEach(function (curr, index, arr) {
        price += Number(curr.money)
      })
      console.log(price)
      this.inspermoney = '￥' + price
    },
    // 检验删除确定
    YandelConfirm () {
      this.YanTableList.splice(this.YanDelIndex, 1)
      this.JianYanPriceKeyup()
      this.YanAddBtnShow = true
    },
    // 检验的表格 选择行
    yanTr (item, index) {
      if (item.imgShow) {
        // 新增按钮展示
        item.imgShow = false
        this.YanAddBtnShow = true
      } else {
        for (var i = 0; i < this.YanTableList.length; i++) {
          this.YanTableList[i].imgShow = false
        }
        // 删除按钮展示
        item.imgShow = true
        this.YanAddBtnShow = false
        this.YanDelIndex = index
      }
    },
    YanXiangmuSearch () {
      // 检验项目字典
      this.getJianyanZiDian()
    },
    // 检验项目确定按钮
    YanXiangmuConfirm (value, index) {
      for (var i = 0; i < this.YanTableList.length; i++) {
        if (value === this.YanTableList[i].xiangmu) {
          Toast('不可重复添加相同项目')
          return false
        }
      }
      var obj = {
        id: this.YanXiangmuList[index].id,
        money: null,
        imgShow: false,
        bianma: null,
        zhenduan: this.zhenduan,
        renyuan: null,
        riqi: null,
        Jjianyanpictures: [],
        xiangmu: value,
        detail: [],
        jianyanxiangmu_id: this.YanXiangmuList[index].id
      }
      this.YanTableList.push(obj)
      this.YanXiangmuShow = false
    },
    // 检查删除确定按钮
    ChadelConfirm () {
      this.CtableList.splice(this.CdelIndex, 1)
      this.PriceKeyup()
      this.CaddBtnShow = true
    },
    // 检查 金额按下
    PriceKeyup () {
      console.log(this.CtableList)
      var price = 0
      this.CtableList.forEach(function (curr, index, arr) {
        price += Number(curr.money)
      })
      console.log(price)
      this.checkmoney = '￥' + price
    },
    // 检查的每行点击事件
    jianChaTr (item, index) {
      if (item.imgShow) {
        // 新增按钮展示
        item.imgShow = false
        this.CaddBtnShow = true
      } else {
        for (var i = 0; i < this.CtableList.length; i++) {
          this.CtableList[i].imgShow = false
        }
        // 删除按钮展示
        item.imgShow = true
        this.CaddBtnShow = false
        this.CdelIndex = index
      }
    },
    // // 检验项目字典
    getJianyanZiDian () {
      this.$http.findXiangMuZiDian({name: this.YanXiangmuValue})
        .then(res => {
          console.log(res)
          if (res.data.status === 'success') {
            var _this = this
            // 检验
            this.YanXiangmuList = []
            this.YanXiangmuColumns = []
            res.data.data.forEach(function (current, index, arr) {
              _this.YanXiangmuList.push(current)
              _this.YanXiangmuColumns.push(current.inspect_name)
            })
          }
        })
        .catch(err => {
          console.log(err)
        })
    },
    // 检查项目搜索
    CxiangmuSearch () {
      this.getfindXiangMuZiDian()
    },
    // 检查项目字典
    getfindXiangMuZiDian () {
      this.$http.findjianchaZiDian({name: this.CxiangmuValue})
        .then(res => {
          console.log(res)
          if (res.data.status === 'success') {
            var _this = this
            // 检查
            this.CxiangmuList = []
            this.CxiangmuColumns = []
            res.data.data.forEach(function (current, index, arr) {
              _this.CxiangmuList.push(current)
              _this.CxiangmuColumns.push(current.check_name)
            })
          }
        })
        .catch(err => {
          console.log(err)
        })
    },
    // 检查项目确定按钮
    CxiangmuConfirm (value, index) {
      // var detailName = this.CxiangmuList[index].detail_name
      for (var i = 0; i < this.CtableList.length; i++) {
        if (value === this.CtableList[i].xiangmu) {
          Toast('不可重复添加相同项目')
          return false
        }
      }
      //
      // name: value,
      var obj = {
        id: this.CxiangmuList[index].id,
        money: null,
        imgShow: false,
        riqi: null,
        biaoxian: null,
        panduan: null,
        baogaorenyuan: null,
        linchuangzhenduan: this.zhenduan,
        xiangmu: value,
        data_user_id: this.data_user_id,
        op_user_id: this.op_user_id,
        Cjianchaimg: [],
        bianma: null
      }
      this.CtableList.push(obj)
      this.CxiangmuShow = false
    },
    // 下一步
    next () {
      if (this.menuIndex === 0) {
        // if (this.mzhm === '' || this.mzhm === undefined || this.mzhm === null) {
        //   Toast('请填写门诊号码')
        //   return false
        // }
        if (this.riqi === '' || this.riqi === undefined || this.riqi === null) {
          Toast('请选择就诊日期')
          return false
        }
        if (this.jigou === '' || this.jigou === undefined || this.jigou === null) {
          Toast('请选择就诊机构')
          return false
        }
        if (this.keshi === '') {
          Toast('请选择就诊科室')
          return false
        }
        if (this.yisheng === '') {
          Toast('请选择就诊医生')
          return false
        }
        if (this.zhenduan === '') {
          Toast('请选择门诊诊断')
          return false
        }
      } else if (this.menuIndex === 1) {
        // 如果门诊病历填过值 一定要上传图片
        if (
          this.zhusu !== '' ||
          this.xianbingshi !== '' ||
          this.jiwangshi !== '' ||
          this.tige !== '' ||
          this.fuzhu !== '' ||
          this.cuoshi !== ''
        ) {
          if (this.bimg.length <= 0) {
            Toast('请上传门诊病历照片')
            return false
          }
        }
      } else if (this.menuIndex === 2) {
        if (this.tableList.length > 0) {
          if (this.cimg.length <= 0) {
            Toast('请上传处方信息照片')
            return false
          }
        }
      } else if (this.menuIndex === 3) {
        if (this.CtableList.length > 0) {
          for (var i = 0; i < this.CtableList.length; i++) {
            if (this.CtableList[i].money === '' || this.CtableList[i].money === null || this.CtableList[i].money === undefined) {
              Toast('请填写' + this.CtableList[i].xiangmu + '金额')
              return false
            }
          }
        }
      } else if (this.menuIndex === 4) {
      }
      this.menuIndex++
      if (this.menuIndex >= 4) {
        return false
      }
    },
    // 点击步骤条
    changeMenu (index) {
      // if (this.isTijiao === true) {
      if (this.menuIndex === 0) {
        // if (this.mzhm === '' || this.mzhm === undefined || this.mzhm === null) {
        //   Toast('请填写门诊号码')
        //   return false
        // }
        if (this.riqi === '' || this.riqi === undefined || this.riqi === null) {
          Toast('请选择就诊日期')
          return false
        }
        if (this.jigou === '' || this.jigou === undefined || this.jigou === null) {
          Toast('请选择就诊机构')
          return false
        }
        if (this.keshi === '') {
          Toast('请选择就诊科室')
          return false
        }
        if (this.yisheng === '') {
          Toast('请选择就诊医生')
          return false
        }
        if (this.zhenduan === '') {
          Toast('请选择门诊诊断')
          return false
        }
      } else if (this.menuIndex === 1) {
        // 如果门诊病历填过值 一定要上传图片
        if (
          this.zhusu !== '' ||
            this.xianbingshi !== '' ||
            this.jiwangshi !== '' ||
            this.tige !== '' ||
            this.fuzhu !== '' ||
            this.cuoshi !== ''
        ) {
          if (this.bimg.length <= 0) {
            Toast('请上传门诊病历照片')
            return false
          }
        }
      } else if (this.menuIndex === 2) {
        if (this.tableList.length > 0) {
          if (this.cimg.length <= 0) {
            Toast('请上传处方信息照片')
            return false
          }
        }
      } else if (this.menuIndex === 3) {
        if (this.CtableList.length > 0) {
          // var isFalse = true
          for (var i = 0; i < this.CtableList.length; i++) {
            if (this.CtableList[i].money === '' || this.CtableList[i].money === null || this.CtableList[i].money === undefined) {
              Toast('请填写' + this.CtableList[i].xiangmu + '金额')
              return false
            }
          }
        }
      } else if (this.menuIndex === 4) {
        if (this.YanTableList.length > 0) {
          for (var k = 0; k < this.YanTableList.length; k++) {
            if (this.YanTableList[k].money === '' || this.YanTableList[k].money === null || this.YanTableList[k].money === undefined) {
              Toast('请填写' + this.YanTableList[k].xiangmu + '金额')
              return false
            }
          }
        }
      } else {
        if (index > this.menuIndex) {
          return false
        } else {
          this.menuIndex = index
        }
      }
      this.menuIndex = index
    },
    // 用法字典
    getlistByType () {
      this.$http.listByType({dict_type: 'drug_useage'})
        .then(res => {
          console.log(res)
          if (res.data.status === 'success') {
            for (var i = 0; i < res.data.data.length; i++) {
              this.yongfaColumns.push(res.data.data[i].dict_name)
            }
          }
        })
        .catch(err => {
          console.log(err)
        })
    },
    // 规格确认按钮
    guigeonConfirm (value, index) {
      this.guige = this.guiGeAll[index].standards
      this.danwei = this.guiGeAll[index].unit
      this.guigeshow = false
    },
    // 诊断确认按钮
    zhenduanConfirm (value, index) {
      this.zhenduan = value
      this.zhenduanshow = false
    },
    // 诊断搜索
    zhenduanSearch () {
      this.getZhenduan()
    },
    // 获取诊断
    getZhenduan () {
      this.$http.getDiagnoseList({key: this.zhenduanValue})
        .then(res => {
          console.log(res)
          this.zhenduanColumns = []
          if (res.data.status === 'success') {
            for (var i = 0; i < res.data.data.length; i++) {
              this.zhenduanColumns.push(res.data.data[i].name)
            }
          }
        })
        .catch(err => {
          console.log(err)
        })
    },
    // 药品 用法的确定按钮
    yongfaonConfirm (value, index) {
      this.yongfa = value
      this.yongfashow = false
    },
    // 药品 频次的确定按钮
    pincionConfirm (value, index) {
      this.pinci = value
      this.pincishow = false
    },
    /* 药品字典 去重 名称 findYaoPinQuChongZiDian */
    findYaoPinQuChongZiDian () {
      this.$http.findYaoPinQuChongZiDian({name: this.yaopinValue})
        .then(res => {
          console.log(res)
          var _this = this
          if (res.data.status === 'success') {
            _this.yaopinColumns = []
            res.data.data.forEach(function (current, index, arr) {
              _this.yaopinColumns.push(current.name)
            })
          }
        })
        .catch(err => {
          console.log(err)
        })
    },
    // 药品字典单位，规格
    getfindYaoPinZiDian () {
      this.$http.findYaoPinZiDian({name: this.mingcheng})
        .then(res => {
          console.log(res)
          if (res.data.status === 'success') {
            var _this = this
            _this.guigeColumns = []
            _this.guiGeAll = res.data.data
            if (res.data.data.length === 1) {
              this.guige = this.guiGeAll[0].standards
              this.danwei = this.guiGeAll[0].unit
              this.guigeshow = false
            } else {
              this.guigeshow = true
            }
            res.data.data.forEach(function (current, index, arr) {
              _this.guigeColumns.push(current.standards + '(' + current.unit + ')')
            })
          }
        })
        .catch(err => {
          console.log(err)
        })
    },
    // 药品搜索
    yaopinonSearch () {
      // this.getfindYaoPinZiDian()
      this.findYaoPinQuChongZiDian()
    },
    // 药品确定
    yaopinonConfirm (val, index) {
      this.mingcheng = val
      this.yaopinShow = false
      this.getfindYaoPinZiDian()
      // this.guigeshow = true
    },
    // 机构确定按钮
    jigouonConfirm (val, index) {
      this.jigou = val
      this.jigoushow = false
    },
    // 机构搜索
    jigouonSearch () {
      this.getfindHopZiDian()
    },
    // 机构字典
    getfindHopZiDian () {
      this.$http.findHopZiDian({city: this.city, name: this.jigouValue})
        .then(res => {
          console.log(res)
          if (res.data.status === 'success') {
            var _this = this
            _this.jigouColumns = []
            res.data.data.forEach(function (current, index, arr) {
              _this.jigouColumns.push(current.hopstial_name)
            })
          }
        })
        .catch(err => {
          console.log(err)
        })
    },
    // 科室搜索
    keshionSearch () {
      //  获取科室
      this.getfindKeShiZiDian()
    },
    // 选择科室的确定按钮
    keShionConfirm (value, index) {
      this.keshi = value
      this.keShishow = false
    },
    // 获取科室
    getfindKeShiZiDian () {
      this.$http.findKeShiZiDian({name: this.keshiValue})
        .then(res => {
          console.log(res)
          if (res.data.status === 'success') {
            this.keshiColumns = []
            var _this = this
            res.data.data.forEach(function (current, index, arr) {
              _this.keshiColumns.push(current.name)
            })
          }
        })
        .catch(err => {
          console.log(err)
        })
    },
    // 修改 接口
    getfinOneMedical () {
      this.$http.finOneMedical({id: this.$route.query.id})
        .then(res => {
          console.log(res)
          if (res.data.status === 'success') {
            this.isTijiao = true
            if (Number(res.data.data.hour) === 0) {
              this.isHave = true
            } else if (Number(res.data.data.hour) === 1) {
              this.isHave = false
              this.isXiugai = true
            }
            if (this.isEdit === 0) {
              this.isHave = true // 不可编辑只可查看
              this.isXiugai = false
            }
            this.mzhm = res.data.data.mzhm
            this.zhusu = res.data.data.zhusu
            this.cuoshi = res.data.data.cuoshi
            this.tige = res.data.data.tige
            this.xianbingshi = res.data.data.xianbingshi
            this.jigou = res.data.data.jigou
            this.keshi = res.data.data.keshi
            this.jiwangshi = res.data.data.jiwangshi
            this.fuzhu = res.data.data.fuzhu
            this.tige = res.data.data.tige
            this.riqi = res.data.data.riqi
            this.zhenduan = res.data.data.zhenduan
            this.yisheng = res.data.data.yisheng
            this.tableList = res.data.data.drugs
            this.CtableList = res.data.data.Clist
            this.YanTableList = res.data.data.Jlist
            this.bimg = res.data.data.bimg
            this.cimg = res.data.data.cimg
            if (res.data.data.inspermoney === undefined) {
              this.checkmoney = ''
            } else {
              this.checkmoney = '￥' + res.data.data.checkmoney
            }
            if (res.data.data.inspermoney === undefined) {
              this.inspermoney = ''
            } else {
              this.inspermoney = '￥' + res.data.data.inspermoney
            }
            this.age = Number(new Date(this.riqi).getFullYear()) - Number(new Date(this.chushengriqi).getFullYear())
          }
        })
        .catch(err => {
          console.log(err)
        })
    },
    // 就诊日期确定
    Onconfirm (value, index) {
      this.riqi = this.wanzhengDate(new Date(this.currentDate))
      this.age = Number(new Date(this.riqi).getFullYear()) - Number(new Date(this.chushengriqi).getFullYear())

      this.isDateShow = false
    },
    formatter (type, val) {
      if (type === 'year') {
        return `${val}年`
      } else if (type === 'month') {
        return `${val}月`
      } else if (type === 'day') {
        return `${val}日`
      }
      return val
    },
    wanzhengDate (date) {
      var YY = date.getFullYear()
      var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)
      var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate())
      var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'
      var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':'
      var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds())

      return YY + '-' + MM + '-' + DD + ' ' + hh + mm + ss
    },
    // 删除 药品
    deleteAdd (index) {
      console.log(index)
      // this.tableList.splice(index, 1)
      this.delIndex = index
      this.delshow = true
    },
    delConfirm () {
      this.tableList.splice(this.delIndex, 1)
    },
    // 药品添加
    add () {
      if (this.isHave === false) {
        var obj = {
          name: this.mingcheng,
          yongliang: this.liang,
          yongfa: this.yongfa,
          pinci: this.pinci,
          danwei: this.danwei,
          zongliang: this.zong,
          specifications: this.guige
        }
        if (this.mingcheng.length > 0) {
          for (var i = 0; i < this.tableList.length; i++) {
            if (
              this.mingcheng === this.tableList[i].name &&
              this.guige === this.tableList[i].specifications &&
              this.danwei === this.tableList[i].danwei
            ) {
              Toast('请勿重复添加药品')
              return false
            }
          }
          this.tableList.unshift(obj)
          this.mingcheng = ''
          this.liang = ''
          this.yongfa = ''
          this.pinci = ''
          this.danwei = ''
          this.zong = ''
          this.guige = ''
          this.yaopinValue = ''
        } else {
          Toast('请选择药品名称')
        }
      }
    },
    // 获取这个人的基本信息
    getFindUserXinXi () {
      this.$http.findUserXinXiTuoMin({data_user_id: this.data_user_id})
        .then(res => {
          console.log(res)
          if (res.data.status === 'success') {
            this.name = res.data.data.name
            if (Number(res.data.data.SEX) === 1) {
              this.sex = '男'
            } else if (Number(res.data.data.SEX) === 2) {
              this.sex = '女'
            }
            this.age = res.data.data.age
            this.chushengriqi = res.data.data.chushengriqi
          }
        })
        .catch(err => {
          console.log(err)
        })
    },
    // 返回
    back () {
      // 查看
      if (this.isHave === true) {
        this.$router.history.go(-1)
      } else {
        this.backshow = true
      }
    },
    backConfirm () {
      // 修改或保存
      this.$router.history.go(-1)
    },
    keep () {
      var _this = this
      for (var k = 0; k < this.YanTableList.length; k++) {
        if (this.YanTableList[k].money === '' || this.YanTableList[k].money === null) {
          Toast('请填写' + this.YanTableList[k].xiangmu + '金额')
          return false
        }
      }
      var Clist = []
      var Jlist = []
      if (this.isTijiao === false) {
        this.CtableList.forEach(function (curr, index, arr) {
          var ott = {
            Criqi: curr.riqi,
            biaoxian: curr.biaoxian,
            panduan: curr.panduan,
            baogaorenyuan: curr.baogaorenyuan,
            linchuangzhenduan: curr.linchuangzhenduan,
            xiangmu: curr.xiangmu,
            data_user_id: _this.data_user_id,
            op_user_id: _this.op_user_id,
            Cjianchaimg: curr.Cjianchaimg,
            bianma: curr.bianma,
            money: curr.money
          }
          Clist.push(ott)
        })
        this.YanTableList.forEach(function (curr, index, arr) {
          var yan = {
            data_user_id: _this.data_user_id,
            op_user_id: _this.op_user_id,
            jianyanxiangmu_id: curr.jianyanxiangmu_id,
            detail: curr.detail,
            bianma: curr.bianma,
            zhenduan: curr.zhenduan,
            renyuan: curr.renyuan,
            Jriqi: curr.riqi,
            jianyanpictures: curr.Jjianyanpictures,
            money: curr.money,
            xiangmu: curr.xiangmu
          }
          Jlist.push(yan)
        })
        this.$http.insertMedical({
          checkmoney: this.checkmoney.split('￥')[1],
          inspermoney: this.inspermoney.split('￥')[1],
          op_user_id: this.op_user_id,
          data_user_id: this.data_user_id,
          mzhm: this.mzhm,
          riqi: this.riqi,
          jigou: this.jigou,
          keshi: this.keshi,
          yisheng: this.yisheng,
          zhenduan: this.zhenduan,
          zhusu: this.zhusu,
          xianbingshi: this.xianbingshi,
          jiwangshi: this.jiwangshi,
          tige: this.tige,
          fuzhu: this.fuzhu,
          cuoshi: this.cuoshi,
          drugs: this.tableList,
          bimg: this.bimg,
          cimg: this.cimg,
          Clist: Clist,
          Jlist: Jlist,
          age: this.age
        })
          .then(res => {
            console.log(res)
            if (res.data.status === 'success') {
              this.$router.history.go(-1)
            }
          })
          .catch(err => {
            console.log(err)
          })
      } else if (this.isTijiao === true) {
        this.CtableList.forEach(function (curr, index, arr) {
          var ott = {
            Criqi: curr.riqi,
            biaoxian: curr.biaoxian,
            panduan: curr.panduan,
            baogaorenyuan: curr.baogaorenyuan,
            linchuangzhenduan: curr.linchuangzhenduan,
            xiangmu: curr.xiangmu,
            data_user_id: _this.data_user_id,
            op_user_id: _this.op_user_id,
            Cjianchaimg: curr.Cjianchaimg,
            bianma: curr.bianma,
            money: curr.money
          }
          Clist.push(ott)
        })
        this.YanTableList.forEach(function (curr, index, arr) {
          var yan = {
            data_user_id: _this.data_user_id,
            op_user_id: _this.op_user_id,
            jianyanxiangmu_id: curr.jianyanxiangmu_id,
            detail: curr.detail,
            bianma: curr.bianma,
            zhenduan: curr.zhenduan,
            renyuan: curr.renyuan,
            Jriqi: curr.riqi,
            jianyanpictures: curr.Jjianyanpictures,
            money: curr.money,
            xiangmu: curr.xiangmu
          }
          Jlist.push(yan)
        })
        this.$http.updateMedical({
          id: this.id,
          checkmoney: this.checkmoney.split('￥')[1],
          inspermoney: this.inspermoney.split('￥')[1],
          op_user_id: this.op_user_id,
          data_user_id: _this.data_user_id,
          mzhm: this.mzhm,
          riqi: this.riqi,
          jigou: this.jigou,
          keshi: this.keshi,
          yisheng: this.yisheng,
          zhenduan: this.zhenduan,
          zhusu: this.zhusu,
          xianbingshi: this.xianbingshi,
          jiwangshi: this.jiwangshi,
          tige: this.tige,
          fuzhu: this.fuzhu,
          cuoshi: this.cuoshi,
          drugs: this.tableList,
          bimg: this.bimg,
          cimg: this.cimg,
          Clist: Clist,
          Jlist: Jlist,
          age: this.age
        })
          .then(res => {
            console.log(res)
            if (res.data.status === 'success') {
              this.$router.history.go(-1)
            }
          })
          .catch(err => {
            console.log(err)
          })
      }
    },
    clickMenu (index) {
      this.menuIndex = index
    }
  }
}
</script>

<style scoped>
  .all{
    width: 100vw;
    height: 100%;
    overflow: auto;
    background: #FAF9FE;
    font-family: "PingFang SC";
  }
  .top{
    position: sticky;
    top: 0;
    z-index: 999;
  }
  header {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    color: #333;
    background: white;
    border-bottom: 1px solid #E5E5E5;
  }
  .solt{
    color: #1DA4F2;
  }
  header .div {
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 15px;
    font-family: PingFang SC;
    font-weight: bold;
  }
  header .div:nth-child(1){
    width: 30%;
  }

  header .div:nth-child(2) {
    justify-content: center;
    width: 40%;
  }
  .div:nth-child(3) {
    width: 30%;
    justify-content: flex-end;
  }
  .div:nth-child(3) span{
    margin-right: 15px;
  }
  .div:nth-child(3) img{
    width: 15px;
    height: 15px;
    margin-right: 5px;
  }
  .div:nth-child(1) img{
    width: 7px;
    height: 13px;
    margin: 0 5px 0 15px;
  }
  .menu{
    width: 100%;
    height: 60px;
    background: #1DA4F2;
    box-shadow: 0px 1px 0px 0px #E5E5E5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow:hidden;
  }
  .content1 ul,
  .content3 ul{
    padding: 0 10px;
    box-sizing: border-box;
    background: white;
  }
  .content3{
    min-height: 75vh;
  }
  .content1 ul li,
  .content3 ul li{
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /*padding: 0 5px;*/
    box-sizing: border-box;
    font-size: 15px;
    font-family: PingFang SC;
    font-weight: 500;
    border-bottom: 1px solid #E5E5E5;
  }
  .content1 ul li input,
  .content3 ul li input{
    text-align: right;
    border: none;
  }
  .tan{
    width: 13px;
    height: 7px;
  }
  .smallLi{
    border-bottom: none !important;
  }
  .smallLi_left, .smallLi_right{
    width: 47%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #E5E5E5;
  }
  .smallLi_left div:nth-child(1),
  .smallLi_right div:nth-child(1)
  {
    width: 100px;
  }
  .smallLi_left div:nth-child(2),
  .smallLi_right div:nth-child(2)
  {
    width: 70%;
    overflow: hidden;
  }
  .smallLi div input {
    width: 100%;
  }
  .content2{
    background: white;
    /*padding-bottom: 30px;*/
    box-sizing: border-box;
    font-size: 15px;
  }
  .xianzhi{
    color: #999;
  }
  .content2 ul{
    width: 92%;
    margin: 0 auto;
  }

  .content2 ul li:first-child,
  .content2 div p{
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
  }
  .hengGang{
    display: block;
    width: 2px;
    height: 15px;
    background: #1DA4F2;
    border-radius: 2px;
    margin-right: 8px;
    margin-left: 10px;
  }
  .p_header{
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    background: white;
    padding: 0 5px;
    box-sizing: border-box;
    font-size: 15px;
    font-weight: bold;
  }
  .content2 ul li:first-child{
    justify-content: space-between;
  }
  .content2 textarea{
    resize: none;
    border-radius: 10px;
    background: #FAF9FE;
    border: none;
    padding: 10px;
    box-sizing: border-box;
  }
  .content2 ul li textarea{
    width: 100%;
    height: 75px;
  }
  .content2 div{
    width: 92%;
    margin: 0 auto;
  }
  .content2 div textarea{
    width: 100%;
    height: 130px;
  }
  .content3 button{
    width: 90%;
    /*width: 250px;*/
    height: 44px;
    background: linear-gradient(90deg, #1DA3F2 0%, #1DC7F2 100%);
    border-radius: 22px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 15px;
    margin: 10px auto;
  }
  .content3 button img{
    width: 15px;
    height: 15px;
    margin-right: 5px;
  }
  .badge{
    width: 14px;
    height: 14px;
    background: #1DA4F2;
    border-radius: 2px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: -5px;
    top: -5px;
    font-size: 11px;
  }
  .yaoPinList{
    width: 100%;
    background: white;
  }
  .li_haeder{
    height: auto !important;
    display: flex;
    /*align-items: center;*/
    padding: 8px 10px !important;
    box-sizing: border-box;
    align-items: flex-start !important;
    justify-content: flex-start;
  }
  .li_haeder div:nth-child(1){
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .li_yaofang{
    height: 25px !important;
    font-size: 13px!important;
  }
  .li_yaofang div{
    width: 50%;
    display: flex;
    align-items: center;
  }
  .li_yaofang img{
    width: 13px;
    height: 12px;
    margin-right: 5px;
  }
  .yaoPinList ul{
    width: 92%;
    margin: 10px auto;
    background: white;
    position: relative;
    border-radius: 10px;
    box-shadow: 0px 5px 20px 0px rgba(0, 0, 0, 0.15);
  }
  .yaoPinList ul li{
    border: none;
  }
  /deep/ .van-empty__image {
    width: 160px;
    height: 110px;
  }
  /deep/ .van-picker__toolbar{
    font-size: 15px !important;
    font-weight: bold;
  }
  /deep/ .van-picker__cancel,
  /deep/ .van-picker__confirm{
    font-size: 15px !important;
    font-weight: bold;
  }
  /deep/ .van-picker__confirm{
    color: #1DA4F2;
  }
  .search{
    width: 100%;
    font-weight: bold;
  }
  /deep/ .van-search__action{
    font-size: 15px;
  }
  /deep/ .van-picker-column__item--selected{
    font-size: 19px !important;
    color: #1DA4F2;
  }
  /deep/ .van-steps--horizontal{
    width: 100%;
  }
  /deep/ .van-step--horizontal .van-step__title{
    font-size: 13px !important;
  }
  /deep/ .van-step--finish .inactive_icon{
    background: #1DA4F2;
    color: white;
  }

  .inactive_icon{
    background: rgba(229, 229, 229, 1) ;
    color: rgba(153, 153, 153, 1);
  }
  .inactive_icon,.active_icon{
    width: 18px;
    height: 18px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius: 50%;
    font-size: 11px !important;
  }
  .active_icon{
    background: #1DA4F2;
    color: white;
  }
  /deep/ .van-step--finish{
    color: #1DA4F2;
  }
  .bottom{
    width: 100%;
    height: 44px;
    position: fixed;
    bottom: 0;
    background: #fff;
  }
  .bottom .botttom_div{
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
    background: #fff;
    font-size: 13px;
  }
  .botttom_div{
    display: flex;
    align-items: center;
    padding: 0 30px;
    box-sizing: border-box;
    /*justify-content: center;*/
  }
  .price{
    color: #E3170D;
    font-size: 17px !important;
  }
  .content4{}
  .content4 table{
    background: white;
    margin: 0 auto;
  }
  .table_all{
    width: 95%;
    margin: 5px auto 120px auto;
    border: 1px solid #E5E5E5;
    border-bottom: none;
  }
  .table_top tr th{
    height: 35px;
    background: #1DA4F2;
    font-size: 11px;
    color: white;
    border-left: 1px solid #E5E5E5;
    border-bottom: 1px solid #E5E5E5;
  }
  .table_bottom{
    overflow: auto;
  }
  .table_bottom tr td{
    background: white;
    font-size: 11px;
    border-left: 1px solid #E5E5E5;
    border-bottom: 1px solid #E5E5E5;
  }
  th:nth-child(1),
  tr td:nth-child(1) {
    width: 10%;
  }
  th:nth-child(2),
  tr td:nth-child(2) {
    width: 10%;
  }
  th:nth-child(3),
  tr td:nth-child(3) {
    width: 30%;
  }
  th:nth-child(4),
  tr td:nth-child(4) {
    width: 15%;
  }
  th:nth-child(5),
  tr td:nth-child(5) {
    width: 25%;
  }
  table td {
    padding: 8px;
    text-align: center;
    overflow: hidden;
    /*box-sizing: border-box;*/
  }
  .addBtn{
    width: 90%;
    height: 44px;
    border-radius: 20px;
    /*margin: auto 20%;*/
    margin: 0 auto;
    border: none;
    /*background: #1DA4F2;*/
    color: #fff;
    background: linear-gradient(90deg, #1DA3F2 0%, #1DC7F2 100%);
    /*position: fixed;*/
    /*bottom: 60px;*/
  }
  .Jian .jianUl{
    background: white;
    padding: 0 10px;
    box-sizing: border-box;
  }
  .Jian .jianUl li{
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #E5E5E5;
    font-size: 15px;
  }
  .Jian .jianUl input{
    border: none;
    text-align: right;
  }
  .title{
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    font-size: 15px;
    font-family: PingFang SC;
    font-weight: bold;
    color: #333333;
    background: white;
  }
  .yinXiang{
    width: 92%;
    height: 130px;
    margin: 10px auto;
  }
  .yinXiang textarea{
    width: 100%;
    height: 100%;
    background: #FAF9FE;
    resize: none;
    border: none;
    border-radius: 10px;
    padding: 10px;
    box-sizing: border-box;
    color: #999999;
    font-size: 13px;
    font-family: PingFang SC;
    font-weight: 500;
  }
  .jiancha_bottom{
    width: 100%;
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    bottom: 0px;
    /*margin-top: 70%;*/
  }
  .jiancha_bottom img{
    width: 15px;
    height: 15px;
    margin-right: 5px;
  }
  .jiancha_bottom .bottom_btn{
    width: 90%;
    height: 44px;
    /*background: #1DA4F2;*/
    background: linear-gradient(90deg, #1DA3F2 0%, #1DC7F2 100%);
    color: white;
    border-radius: 20px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px !important;
  }

  .jianYanMingxi {
    width: 98%;
    margin: 0 auto;
    margin-bottom: 80px;
  }
  .jianYanMingxi ul li{
    display: flex;
    justify-content: space-between;
    /*margin-bottom: 5px;*/
    font-family: PingFang SC;
    font-weight: 500;
    color: #333333;
    /*border-bottom: 1px solid #E5E5E5;*/
  }
  .jianYanMingxi_title button,
  .jianYanMingxi_input,
  .jianYanMingxi ul li button{
    width: 24.7%;
    border: none;
    padding: 8px;
    font-size: 13px;
    background: #1DA4F2;
    /*background: rgba(145, 209, 246, 1);*/
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    word-wrap:break-word;
    word-break:break-all;
    /*border-bottom: 1px solid #E5E5E5;*/
  }
  /*.jianYanMingxi_input input{*/
  /*  width: 80%;*/
  /*  text-align: center;*/
  /*  border: none;*/
  /*}*/
  .jianYanMingxi ul li{
    /*border: 1px solid #E5E5E5 !important;*/
    /*border-radius: 17px;*/
  }
  .btn_left{
    /*border-radius: 17px 0 0 17px;*/
    border-right: 1px solid #E5E5E5 !important;
  }
  .danwei{
    color: #999;
    border-left: 1px solid #E5E5E5 !important;
  }
  .btn_right{
    /*border-radius: 0px 17px 17px 0px;*/
    border-left: 1px solid #E5E5E5 !important;
  }
  .jianYanMingxi_title {
    /*border-radius: 10px 0 0 10px;*/
  }
  .jianYanMingxi_input,
  .jianYanMingxi ul li button{
    /*padding: 5px 0;*/
    /*border-radius: 14px !important;*/
    border-bottom: 1px solid #E5E5E5;
  }
  .jianYanMingxi_input{
    text-align: center;
    padding: 0 10px;
    box-sizing: border-box;
  }
  .white{
    background: white !important;
    /*border: 1px solid #E5E5E5 !important;*/
  }
  .shangChuanBtn{
    width: 90%;
    height: 44px;
    border-radius: 20px;
    /*background: #1DA4F2;*/
    color: white;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: linear-gradient(90deg, #1DA3F2 0%, #1DC7F2 100%);
  }
  .shangChuanBtn img{
    width: 15px;
    height: 15px;
    margin-right: 5px;
  }
  .chufangBtn{
    width: 45%;
    height: 44px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
  }
  .bottom1{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px !important;
    position: sticky !important;
    bottom: 0;
    margin-top: 50px;
  }
  /deep/ .cityInput::placeholder{
    color: #1DA4F2;
  }
  /deep/ .el-steps--horizontal{
    width: 105%;
  }
  /deep/ .el-step.is-center .el-step__description{
    padding: 0;
  }
  /deep/ .el-step__description{
    margin: 0;
  }
  .steps {
    width: 100%;
    position: relative;
    /*margin-bottom: 30px;*/
    counter-reset: step;  /*创建步骤数字计数器*/
  }
  /*步骤描述*/
  .steps li {
    list-style-type: none;
    font-size: 12px;
    text-align: center;
    width: 20%;
    position: relative;
    float: left;
  }

  /*步骤数字*/
  .steps li:before {
    display: block;
    content: counter(step); /*设定计数器内容*/
    counter-increment: step;  /*计数器值递增*/
    width: 15px;
    height: 15px;
    background-color: #1da4f2;
    line-height: 15px;
    border-radius: 50%;
    font-size: 11px;
    color: #fff;
    text-align: center;
    font-weight: 500;
    margin: 0 auto 8px auto;
    z-index: 999;
  }

  /*连接线*/
  .steps li ~ li:after {
    content: '';
    width: 100%;
    height: 1px;
    background-color: #1DA4F2;
    position: absolute;
    left: -40%;
    top: 7px;
    z-index: 1; /*放置在数字后面*/
  }

  /*将当前/完成步骤之前的数字及连接线变绿*/
  .steps li.active:before,
  .steps li.active:after {
    background-color: #1da5f2 !important;
  }

  /*将当前/完成步骤之后的数字及连接线变灰*/
  .steps li.active ~ li:before,
  .steps li.active ~ li:after {
    color: #999 !important;
    background-color: rgba(229, 229, 229, 1) !important;
  }
  /deep/ .el-step__icon{
    width: auto;
    height: auto;
  }
  /deep/ .el-step__icon.is-text{
    border: none;
  }
  /deep/ .is-finish,
  /deep/ .el-step__description.is-process{
    color: #fff;
  }
  /deep/ .el-step__description.is-finish{
    color: white !important;
  }
  /deep/ .el-step__description.is-wait{
    color: rgba(255, 255, 255, 0.7);
  }
  /deep/ .el-step__head.is-finish{
    border-color: #fff;
  }
  /deep/ .el-step__head.is-wait{
    border-color: transparent !important;
  }
  /deep/ .el-step__line{
    border-color: transparent !important;
  }
  /deep/ .el-step.is-horizontal .el-step__line{
    height: 1px;
    top:7px;
  }
  /deep/ .el-step__line{
    background: white;
  }
  /deep/ .van-uploader__input{
    border: 1px solid #E5E5E5;
  }
  .duquBtn{
    width: 150px;
    height: 29px;
    background: #FFFFFF;
    border: 1px solid #1DA4F2;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #1da4f2;
  }
  .duquBtn img{
    margin-right: 5px;
    width: 18px;
    height: 18px;
  }
</style>
